T
T
Tremo2016-01-18 05:18:01
linux
Tremo, 2016-01-18 05:18:01

How to configure config for gmail notifications in zabbix?

good morning!
Interested in such a question, how to configure zabbix so that alarms come straight to gmail mail. In the web interface, everything seems to be set up according to the official documentation, but there are problems with the config where the gmail server prescribes and the data for authentication.
Gives an error: send-mail: Cannot open mailhub:25 Can't send mail: sendmail process failed with error code 1

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Reechart, 2016-01-18
@Reechart

Use sendEmail

  • Create a script 'zabbix_sendemail' (chmod 755) in the AlertScriptsPath folder specified by '/usr/local/etc/zabbix_server.conf'
#!/bin/sh
      export [email protected]
      export smtpserver=yoursmtpserver.com
      export smtplogin=smtp_user
      export smtppass=smtp_password
    $ /usr/bin/sendEmail -f $smtpemailfrom -t $1 -u $2 -m $3 -s $smtpserver:25 -xu $smtplogin -xp $smtppass

  • Set the Action (Configurations / Actions in the php frontend)
  • Set the Media Type (Administration / Media types in the php frontend) script to zabbix_sendemail
  • Add the Media to the user (Administration / Users / user in php frontend)

O
Oleg Kleshchuk, 2016-01-28
@xenozauros

Put the postfix in "Internet site" mode.
And send mail through localhost without a password.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question