Difference between revisions of "Setting up email"

From EPrints Documentation
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Edit /opt/eprints2/perl_lib/EPrints/SystemSettings.pm
+
{{Manual}}
 +
There are two different ways of configuring EPrints to send email.  You can either edit EPrints configuration to set the SMTP server or your can use Postfix or similar applications and set them up as a smarthost that can relay email via another SMTP server.
  
You need to add the following as a new line at around line 32:  
+
== Configuring SMTP in EPrints ==
 +
Edit EPRINTS_PATH/perl_lib/EPrints/SystemSettings.pm (e.g. /opt/eprints3/perl_lib/EPrints/SystemSettings.pm) and set a value for the '''smtp_server''' line:
  
'''smtp_server' => 'smtpserver.domain.tld',''
+
E.g.
 +
'smtp_server' => 'smtp.foobar.ac.uk',
  
e.g.
+
Once changing this setting you will need to test EPrints configuration and reload the webserver:
 +
EPRINTS_PATH/bin/epadmin test
 +
apachectl graceful
 +
If you are running Debian/Ubuntu Linux ''apache2ctl reload'' may be a better way to reload the webserver.
 +
 
 +
The advantage of using this method is that it will not effect how mail is sent by any other applications on the server.  The disadvantage is it may be difficult to debug if users do not receive email as expected.
 +
 
 +
== Configuring Postfix as an Email Smarthost ==
 +
Follow instructions on how to install Postfix and configure as a smarthost at https://www.cyberciti.biz/faq/how-to-configure-postfix-relayhost-smarthost-to-send-email-using-an-external-smptd/  There is no need to reload the webserver once you have finished, as nothing should have changed in the EPrints configuration.
 +
 
 +
The advantage of installing Postfix as a smarthost is that you can check /var/log/maillog if there are problems with email being sent, which should make it easier to determine whether it is the EPrints server or the SMTP server that is causing the problem.
  
'''smtp_server' => 'smtp.foobar.ac.uk',''
 
 
[[Category:Configuration]]
 
[[Category:Configuration]]
[[Category:Rubbish]]
 

Latest revision as of 09:03, 28 November 2020

Manual Sections

There are two different ways of configuring EPrints to send email. You can either edit EPrints configuration to set the SMTP server or your can use Postfix or similar applications and set them up as a smarthost that can relay email via another SMTP server.

Configuring SMTP in EPrints

Edit EPRINTS_PATH/perl_lib/EPrints/SystemSettings.pm (e.g. /opt/eprints3/perl_lib/EPrints/SystemSettings.pm) and set a value for the smtp_server line:

E.g.

'smtp_server' => 'smtp.foobar.ac.uk',

Once changing this setting you will need to test EPrints configuration and reload the webserver:

EPRINTS_PATH/bin/epadmin test
apachectl graceful

If you are running Debian/Ubuntu Linux apache2ctl reload may be a better way to reload the webserver.

The advantage of using this method is that it will not effect how mail is sent by any other applications on the server. The disadvantage is it may be difficult to debug if users do not receive email as expected.

Configuring Postfix as an Email Smarthost

Follow instructions on how to install Postfix and configure as a smarthost at https://www.cyberciti.biz/faq/how-to-configure-postfix-relayhost-smarthost-to-send-email-using-an-external-smptd/ There is no need to reload the webserver once you have finished, as nothing should have changed in the EPrints configuration.

The advantage of installing Postfix as a smarthost is that you can check /var/log/maillog if there are problems with email being sent, which should make it easier to determine whether it is the EPrints server or the SMTP server that is causing the problem.