Original issue background:
A few days ago, ops colleagues suddenly found that Zabbix monitoring no longer send mail, and Zabbix monitoring interface status can be displayed. Because there have been similar problems, estimated to be 163 mailbox problems, so the login for the alarm mailbox, directly through the Web page to send mail also error, it is estimated that the mail anti-spam services are limited, need to wait until the next day to recover (the next day is really back to normal), But the same day if you need to continue to use Zabbix mailbox monitoring, only by changing the alarm mailbox.
A new mailbox [email protected] is configured for alerting.
The new problem is as follows
[[Email protected]_master ~]# tail-n 5/etc/mail.rc//view mail.rc mailbox configuration #setting for Zabbix set [email protected] SMTP=SMTP.1 63.com set Smtp-auth-user=qixin_monitor smtp-auth-password=test_haha16set smtp-auth=login[[email protected]_master ~ ]# echo "Mail Content" |mail-s test [email protected][[email protected]_master ~]# smtp-server:550 User has no permission 550 Error "/root/dead.letter" 11/316. . . Message not sent.
The error shows that the user does not have permission, and the previous mailbox [email protected] is OK
1. Find the configuration of two mailboxes
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/5E/wKiom1YbXfSjigOPAAgjbD33wMk108.jpg "title=" 1.png " alt= "Wkiom1ybxfsjigopaagjbd33wmk108.jpg"/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/5B/wKioL1YbXoGhwqQgAAhU9vOpKp4771.jpg "title=" 2.png " alt= "Wkiol1ybxoghwqqgaahu9vopkp4771.jpg"/>
Found two mailboxes pop3/smtp/imap status inconsistent, so open [email protected] The client authorization password.
2. Open the client authorization password
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/5B/wKioL1YbXvih01XPAAL5JMdLkh0229.jpg "style=" float: none; "title=" 3.png "alt=" Wkiol1ybxvih01xpaal5jmdlkh0229.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/5B/wKioL1YbXvjTQ7HcAAHnQ2bOl1Y180.jpg "style=" float: none; "title=" 4.png "alt=" Wkiol1ybxvjtq7hcaahnq2bol1y180.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/74/5E/wKiom1YbX02hNhwuAAOfj0jYdcg457.jpg "title=" 5.png " alt= "Wkiom1ybx02hnhwuaaofj0jydcg457.jpg"/>
This step is required to verify the phone number and bind the phone
Assume that its client authorization password is: fdfdterefcstewrere
3. Test mailbox Send
[Email protected]_master ~]# echo "Mail Content" |mail-s test [email protected]
[Email protected]_master ~]# smtp-server:535 Error:authentication failed
"/root/dead.letter" 11/316
... message not sent.
The user name and password authentication failed to find the 535 error.
4. Manual Test Password
Since the Mail command directly sent a problem, so I did the following several things:
(1) Authenticate username and password via telnet command
[[Email protected]_master ~]# telnet smtp.163.com 25
Trying 220.181.12.13 ...
Connected to smtp.163.com.
Escape character is ' ^] '.
163.com Anti-Spam GT for Coremail System (163com[20141201])
HELO 163.COM
OK
AUTH LOGIN
334 Dxnlcm5hbwu6
cwl4aw5fbw9uaxrvcg==
334 Ugfzc3dvcmq6
Uwl4aw5amtiz
535 Error:authentication failed
(where the user name and password are Base64 encoded conversion, Echo-n Username/password |base64)
(2) test the original [email protected]
The discovery can be successfully landed.
[[Email protected]_master ~]# telnet smtp.163.com 25
Trying 220.181.12.13 ...
Connected to smtp.163.com.
Escape character is ' ^] '.
163.com Anti-Spam GT for Coremail System (163com[20141201])
HELO 163.COM
OK
AUTH LOGIN
334 Dxnlcm5hbwu6
y2xvdmvtzmvuzw==
334 Ugfzc3dvcmq6
uxhabw9uaxrvcimxmjm=
235 Authentication Successful
(3) Keep trying?
What is the difference between these two accounts? Initially, the user name is not the same as the password!! User name can not be modified, then I changed the password to the same head of the row?
But the result is still 535 error:authentication failed, and later even registered a user name without special characters, but still failed.
5. Regression Mailbox Setup Check
Continue than the difference between the new and old account, landing 163.com Web mailbox continue to view, found the following differences
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/5B/wKioL1YbX62iIjXgAAFynRq9O3M210.jpg "title=" 6.png " alt= "Wkiol1ybx62iijxgaafynrq9o3m210.jpg"/>
Is today just opened the Smtp/pop3/imap feature of the mailbox configuration, generated a client authorization password.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/5E/wKiom1YbYA6Chfe0AAGrj2fBpWU739.jpg "title=" 7.png " alt= "Wkiom1ybya6chfe0aagrj2fbpwu739.jpg"/>
650) this.width=650; "title=" 331758.png "alt=" 331758.png "src="/e/u261/themes/default/images/spacer.gif "class=" Ynote-attachment "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px Solid #ddd; "/> This is the previous registered mailbox, that is, the [email protected] configuration, the SMTP service was opened, but did not open the client authorization password, because there is no use of the IMAP service.
Conclusion:
In other words, the previously registered mailbox does not require any client-authorized password, and the newly registered one needs this thing.
Then, whether we pass mail-s or Telnet smtp.163.com or the role is the client, then try to use the client authorization password as a configuration password to try?
So, even succeeded!
[[Email protected]_master ~]# telnet smtp.163.com 25
Trying 220.181.12.13 ...
Connected to smtp.163.com.
Escape character is ' ^] '.
163.com Anti-Spam GT for Coremail System (163com[20141201])
EHLO 163.COM
250-mail
250-pipelining
250-auth LOGIN PLAIN
250-auth=login PLAIN
250-coremail 1uxr2xkj7kg0xki17xgru7i0s8fy2u3uj8cz28x1uuuuu7ic2i0y2urfveoruca0xdruuuuj
250-starttls
8BITMIME
AUTH LOGIN
334 Dxnlcm5hbwu6
cwl4aw5fbw9uaxrvcg==
334 Ugfzc3dvcmq6
axb2d2rjzw1ozgp5dnv0zq==
235 Authentication Successful
Problem, Solution ~ The final configuration is as follows, in fact, the value of Smtp-auth-password from the actual password modified to the client authorization password.
[Email protected]_master ~]# tail-n 5/etc/mail.rc
#setting for Zabbix
Set [email protected] smtp=smtp.163.com
Set Smtp-auth-user=qixin_monitor smtp-auth-password=fdfdterefcstewrere
Set Smtp-auth=login
This article is from the "Dark Magic Cloud" blog, be sure to keep this source http://clovemfong.blog.51cto.com/3297559/1702105
Zabbix Monitored message failed-smtp-server: Error code 550 and 535