To NetEase mailbox as an example, using the ZABBIX through the server to send ma

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

ZABBIX through the msmtp+ server to send mail mutt calls; third party mail

ZABBIX how to deploy here is not introduced. You can search the ZABBIX in my blog

One. The need to use the msmtp tar package, then start the download and configure msmtp

# yum -y install mutt

# cd /tmp/src
# wget
# tar xf msmtp-1.4.31.tar.bz2
# cd msmtp-1.4.31
# ./configure --prefix=/usr/local/msmtp
# make && make install
# mkdir -p /usr/local/msmtp/etc
# vim /usr/local/msmtp/etc/msmtprc
### Add the following content:

account zabbix



auth login

port 25

tls off


password 123

account default:zabbix

logfile /usr/local/msmtp/log/msmtp.log

# vim /root/.msmtprc


tls off

auth login


user zabbix

password 123

# vim /root/.muttrc


set use_from=yes

set from=

set envelope_from=yes

# mkdir -p /usr/local/msmtp/log

# touch /usr/local/msmtp/log/msmtp.log


# vim /etc/Muttrc

Amended as:


set use_from=yes

set realname=

set editor="vi"

set copy=no


# This is receiving a test mail e-mail you can set to own and others such as QQ mailbox to accept test mail for you.

echo "Email" |mutt -s"test"

Configuration of ZABBIX server two.

The AlertScriptsPath=${datadir}/zabbix/alertscripts annotation to cancel, prepared this Email script.

# vim/usr/local/zabbix/share/zabbix/alertscripts/
#####Enter the following contents:

# $1 sendmail address

# $2 sendmail subject

# $3 file

echo "$3" | mutt -s"$2" $1

Add execute permissions:

# chmod +x /usr/local/zabbix/share/zabbix/alertscripts/

Configure the ZABBIX web interface:

The above picture in the two note:

1 Type to select Script

2 Script name here need to call out the name of the script, save it


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Wendy at December 23, 2013 - 2:59 PM