[Bug 26705] New: System preference NoticeBcc not working
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Bug ID: 26705 Summary: System preference NoticeBcc not working Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org It appears that the system preference NoticBcc is not working. We have tested it on two separate instances of Koha 19.11. Can anyone confirm if this syspref is working on 19.11, 20.05 and/or master? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- It seems to work for CHECKOUT on master for me. Which notices did you try? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Severity|major |normal --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Any updates on this Kyle?... I'm going to downgrade it to 'normal' and neither Jonathan nor I can replicate it right now. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Michael Kuhn <mik@adminkuhn.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mik@adminkuhn.ch --- Comment #3 from Michael Kuhn <mik@adminkuhn.ch> --- According to the setting in Koha system preference "NoticeBcc" all notices should be sent to the given e-mail address. But after the update from Koha 19.11.05 to 20.11.03 this stopped working and no e-mails to the BCC-address were created or sent anymore. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Severity|normal |major --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- We now have a second report of this, I am setting a higher priority again. I can't test this as I don't have a system sending email and I believe the BCC is not visible otherwise - could someone try in 20.11 maybe? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I'll provide a fix by Monday -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Are the reporters using multiple addresses on the syspref? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 --- Comment #7 from Michael Kuhn <mik@adminkuhn.ch> --- In our case there is (and always was) only one address in system preference "NoticeBcc". ...but - not directly related to the "NoticeBcc" problem - there seems to be a problem with script "process_message_queue.pl" if it finds two e-mail addresses in field "message_queue.to_address" which leads to the following message: Invalid 'to' parameter: abc@def.com,xyz@def.comxxx: 11 status returned by "/usr/share/koha/bin/cronjobs/process_message_queue.pl" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28017 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Ok, I need help here. Specially from email server admins that can see their logs or understand this behavior :-D What I did: # Install postfix (and mutt) in KTD: $ apt install postfix mutt # it removed exim4 # Add a line to /etc/postfix/main.cf $ echo "header_checks = regexp:/etc/postfix/header_checks" >> /etc/postfix/main.cf # Add a header_checks file: $ echo '/.*:/ WARN' > /etc/postfix/header_checks $ postmap /etc/postfix/header_checks # Restart postfix $ service postfix restart # Watch the logs on a terminal: $ tail -f /var/log/mail.* With that setup, I noticed we needed bug 28017 so we can check things without emails failing because of (say) Gmail policy validations. I generated a 'koha' user in KTD: $ adduser koha Then set things so my user has a check-in notice, and set its address to kohadev-koha@localhost Set KohaAdminEmailAddress to root@localhost Set NoticeBcc to koha@localhost Then run: $ kshell k$ misc/cronjobs/process_message_queue.pl -v => SUCCESS: The logs show: Mar 22 17:14:07 kohadevbox postfix/smtpd[63414]: connect from localhost[127.0.0.1] Mar 22 17:14:07 kohadevbox postfix/smtpd[63414]: 8D73D2604A6: client=localhost[127.0.0.1] Mar 22 17:14:07 kohadevbox postfix/cleanup[63417]: 8D73D2604A6: warning: header Received: from localhost.localdomain (localhost [127.0.0.1])??by kohadevbox (Postfix) with ESMTP id 8D73D2604A6??for <kohadev-koha@localhost>; Mon, 22 Mar 2021 17:14:07 +0000 (UTC) from localhost[127.0.0.1]; from=<root@localhost> to=<kohadev-koha@localhost> proto=ESMTP helo=<localhost.localdomain> Mar 22 17:14:07 kohadevbox postfix/cleanup[63417]: 8D73D2604A6: warning: header Date: Mon, 22 Mar 2021 17:14:07 +0000 from localhost[127.0.0.1]; from=<root@localhost> to=<kohadev-koha@localhost> proto=ESMTP helo=<localhost.localdomain> Mar 22 17:14:07 kohadevbox postfix/cleanup[63417]: 8D73D2604A6: warning: header MIME-Version: 1.0 from localhost[127.0.0.1]; from=<root@localhost> to=<kohadev-koha@localhost> proto=ESMTP helo=<localhost.localdomain> Mar 22 17:14:07 kohadevbox postfix/cleanup[63417]: 8D73D2604A6: warning: header Content-Type: text/plain; charset="utf-8" from localhost[127.0.0.1]; from=<root@localhost> to=<kohadev-koha@localhost> proto=ESMTP helo=<localhost.localdomain> Mar 22 17:14:07 kohadevbox postfix/cleanup[63417]: 8D73D2604A6: warning: header Content-Transfer-Encoding: quoted-printable from localhost[127.0.0.1]; from=<root@localhost> to=<kohadev-koha@localhost> proto=ESMTP helo=<localhost.localdomain> Mar 22 17:14:07 kohadevbox postfix/cleanup[63417]: 8D73D2604A6: warning: header From: root@localhost from localhost[127.0.0.1]; from=<root@localhost> to=<kohadev-koha@localhost> proto=ESMTP helo=<localhost.localdomain> Mar 22 17:14:07 kohadevbox postfix/cleanup[63417]: 8D73D2604A6: warning: header Subject: Check-ins from localhost[127.0.0.1]; from=<root@localhost> to=<kohadev-koha@localhost> proto=ESMTP helo=<localhost.localdomain> Mar 22 17:14:07 kohadevbox postfix/cleanup[63417]: 8D73D2604A6: warning: header Bcc: koha@localhost from localhost[127.0.0.1]; from=<root@localhost> to=<kohadev-koha@localhost> proto=ESMTP helo=<localhost.localdomain> Mar 22 17:14:07 kohadevbox postfix/cleanup[63417]: 8D73D2604A6: warning: header To: kohadev-koha@localhost from localhost[127.0.0.1]; from=<root@localhost> to=<kohadev-koha@localhost> proto=ESMTP helo=<localhost.localdomain> Mar 22 17:14:07 kohadevbox postfix/cleanup[63417]: 8D73D2604A6: warning: header X-Mailer: Koha from localhost[127.0.0.1]; from=<root@localhost> to=<kohadev-koha@localhost> proto=ESMTP helo=<localhost.localdomain> Mar 22 17:14:07 kohadevbox postfix/cleanup[63417]: 8D73D2604A6: warning: header Message-ID: <16164332470.BFB7954cB.63410@kohadevbox> from localhost[127.0.0.1]; from=<root@localhost> to=<kohadev-koha@localhost> proto=ESMTP helo=<localhost.localdomain> Mar 22 17:14:07 kohadevbox postfix/cleanup[63417]: 8D73D2604A6: message-id=<16164332470.BFB7954cB.63410@kohadevbox> Mar 22 17:14:07 kohadevbox postfix/qmgr[63226]: 8D73D2604A6: from=<root@localhost>, size=1071, nrcpt=1 (queue active) Mar 22 17:14:07 kohadevbox postfix/smtpd[63414]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5 Mar 22 17:14:07 kohadevbox postfix/local[63418]: 8D73D2604A6: to=<kohadev-koha@localhost>, relay=local, delay=0.06, delays=0.05/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox) Mar 22 17:14:07 kohadevbox postfix/qmgr[63226]: 8D73D2604A6: removed So the Bcc header is there. I'm not sure why it isn't sending the email afterwards. But I'm sure the header is correctly added. Note: the non-advertised feature of accepting comma separated addresses is still not working. I can solve it on a separate bug report if someone files it. It needs to specify which fields could be multi-address. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> ---
Note: the non-advertised feature of accepting comma separated addresses is still not working. I can solve it on a separate bug report if someone files it. It needs to specify which fields could be multi-address.
I think officially we don't support this, at least not from the GUI where often you can only get past validation entering one address. Maybe the system preferences would have allowed it in the past, but I am not aware of documentation. The report on the mailing list was a custom script that allows to send to multiple addresses, but if we can make that work again without too much trouble, I think it would be nice. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I've just had a report from a customer that this may also be affecting the reply-to addresses... I'm going to do some digging this morning. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- URL| |https://github.com/rjbs/ema | |il-sender/wiki/Bcc -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Just found out that the Mail::Sendmail lib we used before, does 'Example 2' from the link I pasted above: https://metacpan.org/release/Mail-Sendmail/source/lib/Mail/Sendmail.pm#L331 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 118659 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118659&action=edit Bug 26705: Regression tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 118660 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118660&action=edit Bug 26705: Make Koha::Email->send_or_die handle Bcc Koha used to rely on Mail::Sendmail for sending emails. As an SMTP client, the library took the job of extracting Bcc headers (and removing them) to pass them along with the recipients listed on To: and Cc: to the SMTP protocol in the form of RCPT TO: lines. [1] This was overlooked when we moved to Email::Stuffer/Email::Simple and there's a different behavior, that is a design decision [2]. This patchset re-introduces the behavior from Mail::Sendmail by overriding the send_or_die method locally (in Koha::Email) and doing the right thing. Unless an explicit {to} parameter is passed, it extracts the recipients from the headers, as Mail::Sendmail does, and calls $self->SUPER::send_or_die with the right parameters. To test: 1. Apply the regression tests 2. Run: $ kshell k$ prove t/Koha/Email.t => FAIL: Bcc is not handled correctly! 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! The recipients list is correct! No Bcc header sent! 5. Sign off :-D [1] https://metacpan.org/release/Mail-Sendmail/source/lib/Mail/Sendmail.pm#L331 [2] https://metacpan.org/pod/Email::Sender::Manual::QuickStart#Hey,-where's-my-Bcc-support -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28023 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118659|0 |1 is obsolete| | --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 118663 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118663&action=edit Bug 26705: Regression tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118660|0 |1 is obsolete| | --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 118664 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118664&action=edit Bug 26705: Make Koha::Email->send_or_die handle Bcc Koha used to rely on Mail::Sendmail for sending emails. As an SMTP client, the library took the job of extracting Bcc headers (and removing them) to pass them along with the recipients listed on To: and Cc: to the SMTP protocol in the form of RCPT TO: lines. [1] This was overlooked when we moved to Email::Stuffer/Email::Simple and there's a different behavior, that is a design decision [2]. This patchset re-introduces the behavior from Mail::Sendmail by overriding the send_or_die method locally (in Koha::Email) and doing the right thing. Unless an explicit {to} parameter is passed, it extracts the recipients from the headers, as Mail::Sendmail does, and calls $self->SUPER::send_or_die with the right parameters. To test: 1. Apply the regression tests 2. Run: $ kshell k$ prove t/Koha/Email.t => FAIL: Bcc is not handled correctly! 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! The recipients list is correct! No Bcc header sent! 5. Sign off :-D [1] https://metacpan.org/release/Mail-Sendmail/source/lib/Mail/Sendmail.pm#L331 [2] https://metacpan.org/pod/Email::Sender::Manual::QuickStart#Hey,-where's-my-Bcc-support Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 118665 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118665&action=edit Bug 26705: (QA follow-up) Clarify test result Simple output string improvement to fix the copy/paste of the previous tests comment string. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #17 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice one, well done tracking it down. Signing off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #18 from Kyle M Hall <kyle@bywatersolutions.com> --- Email::MIME::Header needs to be added to our dependencies. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #19 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Kyle M Hall from comment #18)
Email::MIME::Header needs to be added to our dependencies.
The deps are Email::Stuffer <- Email::MIME > Email::MIME::Header we could explicitly require Email::MIME, but it is already a dependency for Email::Stuffer. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 --- Comment #20 from Kyle M Hall <kyle@bywatersolutions.com> --- It appears that the problem is that stretch has Email::Mime::Header 1.937 in packages, and buster has 1.949. Unit tests fail on 1.937 but pass on 1.949. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |ASSIGNED --- Comment #21 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Kyle M Hall from comment #20)
It appears that the problem is that stretch has Email::Mime::Header 1.937 in packages, and buster has 1.949. Unit tests fail on 1.937 but pass on 1.949.
Gosh, I love having tests for everything new we add! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118665|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 --- Comment #22 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 118704 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118704&action=edit Bug 26705: (QA follow-up) Clarify test result Simple output string improvement to fix the copy/paste of the previous tests comment string. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 --- Comment #23 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 118705 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118705&action=edit Bug 26705: (QA follow-up) Do not rely on latest Email::MIME This patch makes the implementation use lower-level methods to deal with headers. So the Email::MIME library in Debian 9 works. Params are sorted for testing purposes. To test: 1. Apply this patch 2. Run the tests => SUCCESS: Things pass in D9+ 3. Sign off :-D Thanks Kyle! Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #24 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Martin Renvoize from comment #16)
Created attachment 118665 [details] [review] Bug 26705: (QA follow-up) Clarify test result
Simple output string improvement to fix the copy/paste of the previous tests comment string.
Thanks for that! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118663|0 |1 is obsolete| | Attachment #118664|0 |1 is obsolete| | Attachment #118704|0 |1 is obsolete| | Attachment #118705|0 |1 is obsolete| | --- Comment #25 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 118713 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118713&action=edit Bug 26705: Regression tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 --- Comment #26 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 118714 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118714&action=edit Bug 26705: Make Koha::Email->send_or_die handle Bcc Koha used to rely on Mail::Sendmail for sending emails. As an SMTP client, the library took the job of extracting Bcc headers (and removing them) to pass them along with the recipients listed on To: and Cc: to the SMTP protocol in the form of RCPT TO: lines. [1] This was overlooked when we moved to Email::Stuffer/Email::Simple and there's a different behavior, that is a design decision [2]. This patchset re-introduces the behavior from Mail::Sendmail by overriding the send_or_die method locally (in Koha::Email) and doing the right thing. Unless an explicit {to} parameter is passed, it extracts the recipients from the headers, as Mail::Sendmail does, and calls $self->SUPER::send_or_die with the right parameters. To test: 1. Apply the regression tests 2. Run: $ kshell k$ prove t/Koha/Email.t => FAIL: Bcc is not handled correctly! 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! The recipients list is correct! No Bcc header sent! 5. Sign off :-D [1] https://metacpan.org/release/Mail-Sendmail/source/lib/Mail/Sendmail.pm#L331 [2] https://metacpan.org/pod/Email::Sender::Manual::QuickStart#Hey,-where's-my-Bcc-support Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 --- Comment #27 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 118715 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118715&action=edit Bug 26705: (QA follow-up) Clarify test result Simple output string improvement to fix the copy/paste of the previous tests comment string. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 --- Comment #28 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 118716 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118716&action=edit Bug 26705: (QA follow-up) Do not rely on latest Email::MIME This patch makes the implementation use lower-level methods to deal with headers. So the Email::MIME library in Debian 9 works. Params are sorted for testing purposes. To test: 1. Apply this patch 2. Run the tests => SUCCESS: Things pass in D9+ 3. Sign off :-D Thanks Kyle! Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |The Email::Stuffer library release notes| |we use, doesn't handle Bcc | |as Mail::Sendmail does. So | |Bcc handling wasn't working | |as expected. This patchset | |adds support for explicitly | |handling Bcc (including the | |NoticeBcc feature) to our | |Koha::Email library. Keywords|release-notes-needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 --- Comment #29 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable CC| |fridolin.somers@biblibre.co | |m Version(s)|21.05.00 |21.05.00,20.11.05 released in| | --- Comment #30 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com --- Comment #31 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Doesn't apply cleanly to 20.05, please rebase for backport. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |22343 Status|Pushed to stable |RESOLVED Resolution|--- |FIXED Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22343 [Bug 22343] Add configuration options for SMTP servers -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26705 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29365 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29365 [Bug 29365] Koha::Email needs to be refactored -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org