我已按照以下步骤配置 sendmail
apt-get install sendmail
添加以下内容
/etc/mail/auth/client-info
AuthInfo:<gworks.yyy> "U:<[email protected]>" "I:<[email protected]>" "P:<xxxxxxx>"
sudo bash -c "cd /etc/mail/auth/ && makemap hash client-info < client-info"
在MAILER_DEFINITIONS
/etc/mail/sendmail.mc
之前添加以下行定义(
SMART_HOST', <gworks.yyy>)dnl define(
confAUTH_MECHANISMS',EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl FEATURE(
authinfo','hash /etc/mail/auth/client-info')dnlsudo bash -c "cd /etc/mail/ && m4 sendmail.mc > sendmail.cf"
- 服务发送邮件重新启动
使用 telnet 命令进行测试
来自远程主机的 telnet 命令引发错误Relaying denied
root@e5eae2c464a7:/var/www/public# telnet 10.1.2.3 25
Trying 10.1.2.3...
Connected to 10.1.2.3.
Escape character is '^]'.
220 cthree.gworks.yyy ESMTP Sendmail 8.15.2/8.15.2/Debian-3; Tue, 11 Oct 2016 06:45:28 GMT; (No UCE/UBE) logging access from: development.internet(OK)-development.internet [10.1.2.4]
helo server
250 cthree.gworks.mobi Hello development.internet [10.1.2.4], pleased to meet you
mail from: [email protected]
250 2.1.0 [email protected]... Sender ok
rcpt to: [email protected]
550 5.7.1 [email protected]... Relaying denied
我在这里做错了什么,为什么它没有从远程主机发送邮件?