
Setup A Send Only SMTP server and Configure the Email Media Type in Zabbix 4
For more info on my Zabbix Course visit https://sbcode.net/zabbix/
It is important to get email alerts when a trigger happens in Zabbix. If you don't already have an SMTPĀ server for sending emails, you can also install a Send Only server on the Zabbix Server itself.
The commands in this lecture are
$ sudo apt install mailutils
A postfix config screen should appear,
select 'internet site'
enter the mail servers name, it should be something you've already setup in your existing DNS providers name server elsewhere.
For example. I pre set up an A name record for smtp.seanwasere.com and it points to the IP Address of the this Zabbix Server.
Then configure postfix by calling
$ sudo nano /etc/postfix/main.cf
scroll to the bottom, and change 'inet_interfaces = all' to 'inet_interfaces = loopback-only'
restart postfix
$ sudo systemctl restart postfix
try sending an email from the command line,
$ echo "This is the body" | mail -s "This is the subject" -a "FROM:[senders address]" [your personal email]