Configuring the e-mail alerting system
Before starting, you need an SMTP mail server capable of relaying the mails generated by your Esia server. This mail server must of course be reachable by Esia. To access this mail server, the Esia server will need to know :
- the email address that the Esia server will use to send these emails. (Example: no-reply@example.com or alert@example.com)
- the IP or domain name of your relay mail server.
- SMTP port used (25, 465, …).
- an authentication login if necessary.
- the password corresponding to the login if necessary.
The command syntax is :
- copy
esia-configure -S mail -f $EMAIL -r $HOST:$PORT -u $LOGIN -P
Not all parameters are mandatory. They correspond to :
- -S mail (Section) to specify that you wish to act on the mail section
- f $EMAIL (From) replace $EMAIL with the email address assigned to the server (Example: no-reply@example.com)
- r $HOST:PORT (Relayhost) replace $HOST with the url of your mail server (smtp.example.com) and $PORT with the port (25,465, …)
- u $LOGIN (User) replace $LOGIN with the desired user.
- P (Prompt password) to enter the user password securely. (The -p $PASS option, used in certain cases, will keep the password in the history of commands entered.)
Example:
root@debian-buster:/# esia-configure -S mail -f alert@example.com -r smtp.example.com:465 -u alert -P Password: Confirm password: This settings will be set : From changed => alert@example.com Relayhost: => smtp.example.com:465 User changed => alert Pass changed Do you wish to apply this ? (y,n) y root@debian-buster:/#
Now test your SMTP connection Test sending emails.
en/advanced/alertes_mail.txt · Last modified: 2023/11/09 16:17 by 127.0.0.1