Sunday, August 23, 2009

HOWTO configure zabbix to send emails with postfix

Under Admin|Media Types configure the email option as:

SMTP server: localhost
SMTP helo: myinternetdomain.com
SMTP email: zabbix@myinternetdomain.com

Add a user with email media notifications. It didn't seem to be enough to have this setting, I also had to add an Action. The triggers were an "AND" of:

(A) Trigger severity >= "High"
(B) Trigger value = "PROBLEM"

with the recovery option ticked this got me a PROBLEM email and a RECOVERY email for all triggers above "high". Without the PROBLEM condition I didn't get the recovery message I specified: instead I got two PROBLEM emails with different trigger status (what the?). Others have run into the same issue.

Install postfix and set:

myhostname = myinternetdomain.com
inet_interfaces = 127.0.0.1

You now have a postfix listening on localhost - you can test it with the 'sendmail' terminal command.

1 comment:

Unknown said...

Hi,

I would recommend to use the configuration example that is provided by postfix to avoid abusing of your server.

http://www.postfix.org/STANDARD_CONFIGURATION_README.html#null_client

Regards,
Matthias