Bug 29427 - Debug mode not honoured in SMTP transport
Summary: Debug mode not honoured in SMTP transport
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on: 22343
Blocks:
  Show dependency treegraph
 
Reported: 2021-11-05 15:46 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2022-12-12 21:23 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
The debug flag on the SMTP servers configuration was not being used correctly. This patch implements the expected behavior. Note: Enabling this will lead to lots of logging for each SMTP connection Koha does.
Version(s) released in:
21.11.00,21.05.08
Circulation function:


Attachments
Bug 29427: Regression tests (1.40 KB, patch)
2021-11-05 15:52 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 29427: Make SMTP transport set debug mode correctly (1.10 KB, patch)
2021-11-05 15:52 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 29427: Regression tests (1.46 KB, patch)
2021-11-05 18:59 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 29427: Make SMTP transport set debug mode correctly (1.15 KB, patch)
2021-11-05 18:59 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 29427: Regression tests (1.52 KB, patch)
2021-11-08 08:52 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 29427: Make SMTP transport set debug mode correctly (1.22 KB, patch)
2021-11-08 08:52 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi (tcohen) 2021-11-05 15:46:01 UTC

    
Comment 1 Tomás Cohen Arazi (tcohen) 2021-11-05 15:52:47 UTC
Created attachment 127397 [details] [review]
Bug 29427: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Tomás Cohen Arazi (tcohen) 2021-11-05 15:52:52 UTC
Created attachment 127398 [details] [review]
Bug 29427: Make SMTP transport set debug mode correctly

This patch makes the _transport_ method in Koha::SMTP::Server pass the
debug flag correctly to the Email::Sender::Transport::SMTP->new
constructor.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/SMTP/Server.t
=> FAIL: Oh noes! debug is not passed to the constructor!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Hey! It is being set!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 3 Nick Clemens (kidclamp) 2021-11-05 18:59:11 UTC
Created attachment 127402 [details] [review]
Bug 29427: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 4 Nick Clemens (kidclamp) 2021-11-05 18:59:15 UTC
Created attachment 127403 [details] [review]
Bug 29427: Make SMTP transport set debug mode correctly

This patch makes the _transport_ method in Koha::SMTP::Server pass the
debug flag correctly to the Email::Sender::Transport::SMTP->new
constructor.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/SMTP/Server.t
=> FAIL: Oh noes! debug is not passed to the constructor!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Hey! It is being set!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Martin Renvoize (ashimema) 2021-11-08 08:52:34 UTC
Created attachment 127427 [details] [review]
Bug 29427: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize (ashimema) 2021-11-08 08:52:38 UTC
Created attachment 127428 [details] [review]
Bug 29427: Make SMTP transport set debug mode correctly

This patch makes the _transport_ method in Koha::SMTP::Server pass the
debug flag correctly to the Email::Sender::Transport::SMTP->new
constructor.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/SMTP/Server.t
=> FAIL: Oh noes! debug is not passed to the constructor!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Hey! It is being set!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize (ashimema) 2021-11-08 08:53:15 UTC
Trivial fix, works as expected.. Passing QA
Comment 8 Jonathan Druart 2021-11-08 11:19:52 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 9 Andrew Fuerste-Henry 2021-12-17 13:10:12 UTC
Pushed to 21.05.x for 21.05.08
Comment 10 Victor Grousset/tuxayo 2021-12-22 21:02:03 UTC
Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.