Bug 3810 - Calls to Mail::Sendmail should not fail silently
Summary: Calls to Mail::Sendmail should not fail silently
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: PC All
: PATCH-Sent (DO NOT USE) enhancement
Assignee: Colin Campbell
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-25 06:12 UTC by Colin Campbell
Modified: 2012-10-25 23:04 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Reworked patch submitted (2.86 KB, patch)
2010-02-08 16:19 UTC, Chris Cormack
Details | Diff | Splinter Review
Signed off patch (5.48 KB, patch)
2011-03-15 11:04 UTC, Julian Maurice
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2010-05-21 01:15:16 UTC


---- Reported by colin.campbell@ptfs-europe.com 2009-11-25 18:12:28 ----

Nearly all calls to Mail::Sendmail do not test their return. If they fail they fail without letting anyone it leaves anyone trying to get claims working blind.

Purpose of this bug is to get some minimal logging of failure. There is more to fo to get these working reliably (see http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=2301)



---- Additional Comments From gmcharlt@gmail.com 2010-02-08 15:09:15 ----

Submitted patch does not apply because of rework in C4/Suggestions.pm done by BibLibre.  Concept is still good, so please resubmit.



---- Additional Comments From colin.campbell@ptfs-europe.com 2010-02-08 16:19:50 ----

Created an attachment
Reworked patch submitted

Reworked against current version of Letters.pm
(Suggestionsno longer calls sendmail directly) 



---- Additional Comments From gmcharlt@gmail.com 2010-02-08 16:41:43 ----

Patch pushed.  Bug should remain open, as there are a bunch of calls to sendmail scattered throughout various scripts that should either be carp-ified or, better yet, folded into a central wrapper.



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:15 UTC  ---

This bug was previously known as _bug_ 3810 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=3810
Imported an attachment (id=1582)

Actual time not defined. Setting to 0.0
Setting qa contact to the default for this product.
   This bug either had no qa contact or an invalid one.
The original submitter of attachment 1582 [details] [review] is unknown.
   Reassigning to the person who moved it here: chris@bigballofwax.co.nz.

Comment 1 Chris Cormack 2010-12-14 08:51:06 UTC
Still awaiting follow up patches
Comment 2 Colin Campbell 2010-12-14 10:51:40 UTC
I think the need Galen identified for further patches was largely mitigated by the removal of sendmail from some of the C4 libraries where it was not necessarily checking success/failure.

I've posted a patch that ensures all calls to sendmail elsewhere give the error return on failure (and used carp in all cases)
Comment 3 Chris Cormack 2010-12-14 19:59:21 UTC
Follow up patch has been sent by Colin, thanks Colin.

If we could get a quick signoff (it looks fine to me fwiw) then ill push it up
Comment 4 MJ Ray (software.coop) 2011-01-08 11:14:09 UTC
This bug is mentioned in:
Bug 3810 : Ensure all calls to	Mail::Sendmail handled consistently http://lists.koha-community.org/pipermail/koha-patches/2010-December/013269.html
Comment 5 Julian Maurice 2011-03-15 11:04:39 UTC
Created attachment 3300 [details] [review]
Signed off patch
Comment 6 Chris Cormack 2011-03-16 08:00:29 UTC
Pushed and merged, please test and mark resolved