[Bug 28017] New: Allow @localhost addresses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28017 Bug ID: 28017 Summary: Allow @localhost addresses Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Bug 22343 introduced a rewrite of Koha::Email. One of the changes it introduced was that it now validates all addresses, not just the 'To' header. This immediately affected anyone with default values like root@localhost. An exchange with the library author [1] highlighted that the way we use Email::Valid is to blame for breaking on @localhost addresses. It also made it clear that this behavior can be overridden by using a trivial flag on the call. While the RFC for email systems specify that FQDN needs to be used, debugging bug 26705 highlighted we need this to allow anyone to test email stuffs. I propose to allow non-fqdn addresses. [1] https://github.com/Perl-Email-Project/Email-Valid/issues/49 -- 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=28017 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=26705 Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28017 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 118620 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118620&action=edit Bug 28017: Regression tests 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=28017 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 118621 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118621&action=edit Bug 28017: Allow non-FQDN (@localhost) addresses This patch makes Koha::Email support using @localhost addresses. To test: 1. Apply the regression tests 2. Run: $ kshell k$ prove t/Koha/Email.t => FAIL: Koha::Email doesn't support non-fqdn addresses 3. Apply this patch 4. Repeat 2 => SUCCESS: All tests pass! 5. Sign off :-D 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=28017 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 118622 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118622&action=edit Bug 28017: (follow-up) Make controller scripts use -fqdn as well This patch makes the *memberentry.pl scripts use the -fqdn flag as well. This is to allow setting the @localhost addresses. I'm not sure about the need for this patch, as we shouldn't probably allow end-users to use such addresses, and for testing purposes we can set things on the DB. 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=28017 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |katrin.fischer@bsz-bw.de, | |kyle@bywatersolutions.com, | |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=28017 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118620|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 118644 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118644&action=edit Bug 28017: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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=28017 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118621|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 118645 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118645&action=edit Bug 28017: Allow non-FQDN (@localhost) addresses This patch makes Koha::Email support using @localhost addresses. To test: 1. Apply the regression tests 2. Run: $ kshell k$ prove t/Koha/Email.t => FAIL: Koha::Email doesn't support non-fqdn addresses 3. Apply this patch 4. Repeat 2 => SUCCESS: All tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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=28017 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118622|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 118646 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118646&action=edit Bug 28017: (follow-up) Make controller scripts use -fqdn as well This patch makes the *memberentry.pl scripts use the -fqdn flag as well. This is to allow setting the @localhost addresses. I'm not sure about the need for this patch, as we shouldn't probably allow end-users to use such addresses, and for testing purposes we can set things on the DB. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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=28017 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Signing off because it works as described.. However, I'm not entirely sure about how far it goes. 1. I think we don't need/want the final patch 2. I'm not sure we want to disable the domain checking for all the address headers.. shouldn't we be a bit more selective? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28017 --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Addresses fields currently affected: * 'To' - Shouldn't we require fully compliant non-local emails here? * 'From' - This one I can understand the need for localhost * 'Reply-to' - Again, this one feels like we ought to require a fully compliant non-local email for * 'Return-path' - This one is a more difficult call.. I could imagine an IP based address being used here maybe * 'Cc' - Again, shouldn't this be a fully compliant email * 'Bcc' - As above. Just some food for thought... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28017 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz, | |robin@kallisti.net.nz -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28017 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Martin Renvoize from comment #8)
Addresses fields currently affected:
* 'To' - Shouldn't we require fully compliant non-local emails here? * 'From' - This one I can understand the need for localhost * 'Reply-to' - Again, this one feels like we ought to require a fully compliant non-local email for * 'Return-path' - This one is a more difficult call.. I could imagine an IP based address being used here maybe * 'Cc' - Again, shouldn't this be a fully compliant email * 'Bcc' - As above.
Just some food for thought...
Maybe we need some syspref for enabling this. Like EmailDebug? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28017 --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Martin Renvoize from comment #8)
* 'Return-path' - This one is a more difficult call.. I could imagine an IP based address being used here maybe
Using IPs requires other option switch (-allow_ip), actually. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28017 --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I spoke to our sysadmin about this.. his suggestion was to allow IP and non-fqdn addresses at this low level.. which would allow people to 'get clever' with the admin settings. But to drop the last patch here, as the more user-facing stuff is best left validated at a fairly strict level :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28017 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Allow @localhost addresses |Allow non-FQDN and IP | |addresses in emails -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28017 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28017 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118646|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=28017 --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 118668 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118668&action=edit Bug 28017: Test IPs are supported 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=28017 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=28017 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=28017 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118644|0 |1 is obsolete| | Attachment #118645|0 |1 is obsolete| | Attachment #118668|0 |1 is obsolete| | --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 118696 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118696&action=edit Bug 28017: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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=28017 --- Comment #14 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 118697 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118697&action=edit Bug 28017: Allow non-FQDN (@localhost) addresses This patch makes Koha::Email support using @localhost addresses. To test: 1. Apply the regression tests 2. Run: $ kshell k$ prove t/Koha/Email.t => FAIL: Koha::Email doesn't support non-fqdn addresses 3. Apply this patch 4. Repeat 2 => SUCCESS: All tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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=28017 --- Comment #15 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 118698 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118698&action=edit Bug 28017: Test IPs are supported 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=28017 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=28017 --- Comment #16 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=28017 --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Some tests failing, please fix ASAP t/db_dependent/Letters.t .. 83/84 Fake send_or_die at t/db_dependent/Letters.t line 41. # Failed test 'Exception thrown if invalid email is passed' # at t/db_dependent/Letters.t line 995. # expecting: Koha::Exceptions::BadParameter # found: normal exit # Failed test 'Invalid KohaAdminEmailAddress => status pending' # at t/db_dependent/Letters.t line 999. # got: 'sent' # expected: 'pending' Fake send_or_die at t/db_dependent/Letters.t line 41. # Failed test 'Message 1 status is unchanged' # at t/db_dependent/Letters.t line 1006. # got: 'sent' # expected: 'pending' # Looks like you planned 5 tests but ran 6. # Looks like you failed 3 tests of 6 run. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28017 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28017 --- Comment #18 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 119208 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119208&action=edit Bug 28017: (follow-up) Fix Letters.t 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=28017 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | --- Comment #19 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Follow-up pushed to master. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28017 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|21.05.00 |21.05.00,20.11.05 released in| | CC| |fridolin.somers@biblibre.co | |m --- Comment #20 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=28017 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com --- Comment #21 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Doesn't apply cleanly to 20.05. I'm guessing from comments this depends on 22343 (which is a 20.11 enhancement)? Please rebase if not dependent on 22343 and needed in 20.05. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28017 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |22343 Resolution|--- |FIXED Status|Pushed to stable |RESOLVED 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=28017 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28870 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org