Linux 如何在lvs+Keepalive的配置文件中配置电子邮件身份验证信息
我为mysql设置了一个lvs+Keepalive系统。我在keepalive.conf中保留了以下配置:Linux 如何在lvs+Keepalive的配置文件中配置电子邮件身份验证信息,linux,email,cluster-computing,Linux,Email,Cluster Computing,我为mysql设置了一个lvs+Keepalive系统。我在keepalive.conf中保留了以下配置: global_defs { notification_email { sysadm@myweb.com } notification_email_from sysadm@myweb.com smtp_server mail.myweb.com smtp_connect_timeo
global_defs {
notification_email {
sysadm@myweb.com
}
notification_email_from sysadm@myweb.com
smtp_server mail.myweb.com
smtp_connect_timeout 30
router_id MYSQL_HA_1
}
但我得到了一个错误:
localhost Keepalived_healthcheckers[11751]: SMTP connection ERROR to [0.0.0.0]:25.
我想这是因为没有配置文件中的身份验证信息,我无法发送电子邮件
我的问题是如何使用我的配置文件中的身份验证信息为smtp服务器配置电子邮件身份验证?我的smtp服务器不在ha系统中。我能够解决在keepalive.log中看到的类似问题:
SMTP connection ERROR to [0.0.0.0]:25
我的keepalive.conf看起来像:
global_defs {
notification_email {
....
}
notification_email_from somplace@somewhere.com
smtp_server smtp.somehwere.com
smtp_connect_timeout 30
...
}
我已将smtp配置更新为使用smtp服务器的IP地址而不是主机名:
smtp_server xxx.xxx.xxx.xxx
重新启动keepalived后会产生新的输出和成功的电子邮件通知:
Remote SMTP server [xxx.xxx.xxx.xxx]:25 connected.
我认为这是由于DNS问题,可能是由于缺少dnsmasq服务,也可以通过手动定义主机记录来解决