我已经在 ubuntu 中安装了 sendmail,并尝试使用 telnet 命令进行身份验证。请参阅我的资料
产生用户名和密码
perl -MMIME::Base64 -e 'print encode_base64("username");'
perl -MMIME::Base64 -e 'print encode_base64("password");'
使用 telnet 命令测试
root@cthree:~# telnet 10.1.2.3 25
Trying 10.1.2.3...
Connected to 10.1.2.3.
Escape character is '^]'.
220 cthree.gworks.mobi ESMTP Sendmail 8.15.2/8.15.2/Debian-3; Tue, 11 Oct 2016 12:29:35 GMT; (No UCE/UBE) logging access from: cthree.gworks.mobi(OK)-cthree.gworks.mobi [10.1.2.3]
ehlo 10.1.2.3
250-cthree.gworks.mobi Hello cthree.gworks.mobi [10.1.2.3], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5 LOGIN PLAIN
250-DELIVERBY
250 HELP
auth login
334 VXNlcm5hbWU6
YkVzZWFiLm6vYmk=
334 UGFzc3dvcmQ6
d5VuY29lCTHyMw==
535 5.7.0 authentication failed
它没有登录,它显示身份验证失败错误,我100%确定用户名和密码是正确的。
/etc/mail/sendmail.mc
define(`SMART_HOST', `gworks.mobi')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
FEATURE(`authinfo', `hash /etc/mail/auth/client-info')dnl
/etc/mail/auth/客户端信息
AuthInfo:gworks.mobi "U:[email protected]" "I:[email protected]" "P:xxxxxxxxx"
我毫不怀疑用户名和密码生成,有人能指出这里出了什么问题吗?为什么没有得到身份验证。