Bug 26290 - Allow setting default SMTP parameters in koha-conf.xml
Summary: Allow setting default SMTP parameters in koha-conf.xml
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 22343
Blocks:
  Show dependency treegraph
 
Reported: 2020-08-24 18:01 UTC by Tomás Cohen Arazi
Modified: 2020-09-11 14:29 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 26290: Add option forsetting default SMTP parameters in koha-conf.xml (9.03 KB, patch)
2020-08-24 20:06 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 26290: Make Koha::SMTP::Servers->get_default use koha-conf.xml (2.77 KB, patch)
2020-08-24 20:06 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 26290: Add option forsetting default SMTP parameters in koha-conf.xml (9.10 KB, patch)
2020-09-03 11:15 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 26290: Make Koha::SMTP::Servers->get_default use koha-conf.xml (2.84 KB, patch)
2020-09-03 11:16 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 26290: Make Makefile.PL aware of SMTP configs (7.68 KB, patch)
2020-09-11 14:29 UTC, Tomás Cohen Arazi
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 2020-08-24 18:01:22 UTC
This way people installing Koha can set their SMTP on deployment.
Comment 1 Tomás Cohen Arazi 2020-08-24 20:06:46 UTC
Created attachment 109035 [details] [review]
Bug 26290: Add option forsetting default SMTP parameters in koha-conf.xml

This patch adds an entry to koha-conf.xml for setting a default SMTP
server config. 'koha-create' gets option switches for all options.

To test:
1. Use the tweaked script to crete a new instance
2. Notice it contains entries for smtp_server and they respect your
   options.
3. If you don't choose any option, it sets the current default.
Comment 2 Tomás Cohen Arazi 2020-08-24 20:06:53 UTC
Created attachment 109036 [details] [review]
Bug 26290: Make Koha::SMTP::Servers->get_default use koha-conf.xml

This patch makes the mentioned method use the configured entry in
koha-conf.xml if present, instead of the hardcoded one, which is kept
for people that carries an old koha-conf.xml
Comment 3 Kyle M Hall 2020-09-03 11:15:46 UTC
Created attachment 109617 [details] [review]
Bug 26290: Add option forsetting default SMTP parameters in koha-conf.xml

This patch adds an entry to koha-conf.xml for setting a default SMTP
server config. 'koha-create' gets option switches for all options.

To test:
1. Use the tweaked script to crete a new instance
2. Notice it contains entries for smtp_server and they respect your
   options.
3. If you don't choose any option, it sets the current default.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Kyle M Hall 2020-09-03 11:16:11 UTC
Created attachment 109618 [details] [review]
Bug 26290: Make Koha::SMTP::Servers->get_default use koha-conf.xml

This patch makes the mentioned method use the configured entry in
koha-conf.xml if present, instead of the hardcoded one, which is kept
for people that carries an old koha-conf.xml

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 5 Julian Maurice 2020-09-11 09:42:38 UTC
The SMTP server section can be entirely configured by a debian script, but the default etc/koha-conf.xml used by the "perl Makefile.PL" method cannot be configured at all.
Is there a specific reason for that ?
Comment 6 Tomás Cohen Arazi 2020-09-11 10:40:40 UTC
(In reply to Julian Maurice from comment #5)
> The SMTP server section can be entirely configured by a debian script, but
> the default etc/koha-conf.xml used by the "perl Makefile.PL" method cannot
> be configured at all.
> Is there a specific reason for that ?

I wasn't sure it was useful. Do you think so?
Comment 7 Julian Maurice 2020-09-11 11:36:54 UTC
(In reply to Tomás Cohen Arazi from comment #6)
> I wasn't sure it was useful. Do you think so?

I guess that if it's useful to debian package users, it should be useful to non-debian package users too.
That can be added in a follow-up bug, but I'm a bit worried about this pattern of adding features to debian packages and not in Koha "core". In the long term it could mean that it would be more and more difficult to install Koha on non-debian systems.
Comment 8 Tomás Cohen Arazi 2020-09-11 13:07:49 UTC
(In reply to Julian Maurice from comment #7)
> (In reply to Tomás Cohen Arazi from comment #6)
> > I wasn't sure it was useful. Do you think so?
> 
> I guess that if it's useful to debian package users, it should be useful to
> non-debian package users too.
> That can be added in a follow-up bug, but I'm a bit worried about this
> pattern of adding features to debian packages and not in Koha "core". In the
> long term it could mean that it would be more and more difficult to install
> Koha on non-debian systems.

Hold on. Its been a while since I touched the Makefile.PL, and I'm testing my follow-up.
Comment 9 Tomás Cohen Arazi 2020-09-11 14:29:32 UTC
Created attachment 109949 [details] [review]
Bug 26290: Make Makefile.PL aware of SMTP configs