PDA

View Full Version : How to use an smtp server that requires authentication?


mdeavila
22-03-2005, 23:02
The smtp server I want to use for sending alerts requires authentication. How do I configure the email media to use a specific username and password?

The smtp configuration for 1.1alpha7 does not appear to have a password setting ...

Thoughts?

thanks,

Miguel

sauron
23-03-2005, 05:34
You can define media scripts for this.

Luiz Antonio Oliveira
28-11-2008, 18:39
how? what the parameter?

Calimero
01-12-2008, 12:15
Media scripts are called by Zabbix with three arguments:

1/ Value of "Send to" field of addressee
2/ Notification Subject
3/ Notification Message

eg, a custom SMS notification script would get:
your_media_script 012345789 "Host: test001 - HTTP server: PROBLEM" "Host: test001 - HTTP server: PROBLEM - Date: 2008-12-01 12:10:01 ..."

for an email media script, the "Send to" field of each user would probably contain the email address. zabbix_server would then exec something like:
your_media_script bob@company.com "Host: test001 - HTTP server: PROBLEM" "Host: test001 - HTTP server: PROBLEM - Date: 2008-12-01 12:10:01 ..."


It's up to your script to take proper action with those arguments.

You can use whatever language you want (as long as the OS running zabbix_server supports it). Could be shell, PHP, Perl, compiled C, ...