1, configure the Linux client mail sending function
[[Email protected] script] Vim/etc/mail.rc
Add the following in the file:
Set From=1665***[email protected]
Set smtp=smtp.qq.com
Set Smtp-auth-user=1665***[email protected]
Set Smtp-auth-password=yslsnzvgqqtadhee (QQ mailbox Authorization code, need to turn on POP3 and SMTP will be generated)
Set Smtp-auth=login
2. Whether the test can be used
Cat/tmp/jiankong.log|mailx-v-S ' Hello ' * * * * * * * * @qq. com '
The test discovery can sometimes be sent, sometimes the message is returned and the following error is reported:
[Email protected] script]# smtp-server:530 error:a secure connection is requiered (such as SSL). More information at http://service.mail.qq.com/cgi-bin/help?id=28
"/root/dead.letter" 11/325
... message not sent.
3. Add the following configuration file parameters
Set From=1665***[email protected]
Set smtp=smtp.qq.com
Set Smtp-auth-user=1665***[email protected]
Set Smtp-auth-password=yslsnzvgqqtadhee QQ Mailbox Authorization code, need to turn on POP3 and SMTP will be generated
Set Smtp-auth=login
##########################################
Set SMTP-USE-STARTTLS (followed by SSL authentication information)
Set Ssl-verify=ignore (followed by SSL authentication information)
Set nss-config-dir=/etc/pki/nssdb/(followed by SSL authentication information)
The error occurs again with the error message:
535 error:http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=1001256
smtp-server:535 Error:
http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=1001256
"/root/dead.letter" 11/307
... message not sent.
Workaround:
In the QQ mailbox home Click, set → account →pop3/imap/smtp/exchange/carddav/caldav service, open POP3/SMTP service can solve the problem.
Test send message again, message sent successfully ...
[[email protected] script]# Cat/tmp/jiankong.log |mailx-v-S ' Hello ' 1665***[email protected] '
Resolving host smtp.qq.com ... done.
Connecting to 14.17.57.241 ... connected.
smtp.qq.com ESMTP QQ Mail Server
>>> EHLO www.net-leader.com.cn
250-smtp.qq.com
250-pipelining
250-size 73400320
250-starttls
250-auth LOGIN PLAIN
250-auth=login
250-mailcompress
8BITMIME
>>> STARTTLS
Up to start TLS
Error in Certificate:peer ' s certificate issuer are not recognized.
Comparing DNS Name: "Upload.mail.qq.com"
Comparing DNS Name: "Hwsmtp.exmail.qq.com"
Comparing DNS Name: "Hwimap.exmail.qq.com"
Comparing DNS Name: "Cloudmx.qq.com"
Comparing DNS Name: "Imap.exmail.qq.com"
Comparing DNS Name: "Hwpop.exmail.qq.com"
Comparing DNS Name: "Smtp.qq.com"
SSL parameters:cipher=aes-256, keysize=256, secretkeysize=256,
Issuer=cn=geotrust SSL Ca-g3,o=geotrust Inc.,c=us
Subject=cn=pop.qq.com,ou=r&d,o=shenzhen Tencent Computer Systems company LIMITED,L=SHENZHEN,ST=GUANGDONG,C=CN
>>> EHLO www.net-leader.com.cn
250-smtp.qq.com
250-pipelining
250-size 73400320
250-auth LOGIN PLAIN
250-auth=login
250-mailcompress
8BITMIME
>>> AUTH LOGIN
334 Vxnlcm5hbwu6
>>> mty2ntexmtkxm0bxcs5jb20=
334 Ugfzc3dvcmq6
>>> exnsc256dmdxcxrhzghlzq==
235 Authentication Successful
>>> MAIL From:<[email protected]>
Ok
>>> RCPT To:<[email protected]>
Ok
>>> DATA
354 END data with <CR><LF>.<CR><LF>
>>>.
Ok:queued as
>>> QUIT
221 Bye
This will not be an error, can successfully send mail.
This article is from the "one small step per day" blog, so be sure to keep this source http://fenyuer.blog.51cto.com/11265169/1917019
Linux Mail configuration