- 论坛徽章:
- 1
|
本帖最后由 rdcwayx 于 2014-09-01 18:47 编辑
OS:centos6.4- msmtp安装
- wget [url]http://nchc.dl.sourceforge.net/sourceforge/msmtp/msmtp-1.4.17.tar.bz2[/url]
- tar xvf msmtp-1.4.17.tar.bz2
- cd msmtp-1.4.17
- ./configure
- make && make install
复制代码 我用的是root用户
在/root/目录下创建.msmtprc- vi .msmtprc
- account zabbix
- host smtp.126.com
- port 25
- from [email]xxxx@126.com[/email] #这个是我的126邮箱
- auth login
- .tls off
- user [email]xxxx@126.com[/email]
- password xxxxxxx #这个是126邮箱的密码
- logfile /var/log/zext_msmtp.log
- touch /var/log/zext_msmtp.log
- chown root /var/log/zext_msmtp.log
- chmod 0600 .msmtprc
- chown root .msmtprc
复制代码 发送邮件- msmtp -a zabbix [email]xxxxxxxx@qq.com[/email]
复制代码 过一段时间就会提示:- [root@zabbix ~]# msmtp [email]xxxxxxxx@qq.com[/email]
- msmtp: cannot connect to smtp.126.com, port 25: Connection refused
- msmtp: could not send mail (account default from /root/.msmtprc)
复制代码 求助各位!!! |
|