This way people installing Koha can set their SMTP on deployment.
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.
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
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>
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>
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 ?
(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?
(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.
(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.
Created attachment 109949 [details] [review] Bug 26290: Make Makefile.PL aware of SMTP configs
Created attachment 110758 [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> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 110759 [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> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 110760 [details] [review] Bug 26290: Make Makefile.PL aware of SMTP configs Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
All works well for me and tests are passing. I worked through a dev install, standard install and a package build.. all good. Passing QA
Created attachment 111141 [details] [review] Bug 26290: Display the correct default values on the admin page The "Default configuration" section at the top of the SMTP servers admin page contains the hardcoded values in Koha::SMTP::Servers->default_setting. It should be the values from the config (and default to hardcoded values unless defined)
(In reply to Jonathan Druart from comment #14) > Created attachment 111141 [details] [review] [review] > Bug 26290: Display the correct default values on the admin page > > The "Default configuration" section at the top of the SMTP servers admin page > contains the hardcoded values in Koha::SMTP::Servers->default_setting. > > It should be the values from the config (and default to hardcoded values > unless defined) Thanks! I really missed it!
Pushed to master for 20.11, thanks to everybody involved!
new feature will not be backported to 20.05.x