The problem is: After the installation of SendMail, start the service, send the message the first time to send a successful, after again no matter how to send No, change mailbox also not. After confirming that my message is sent in a format that is correct, think about viewing the mail send log:
[Email protected] ~]# Tail-20/var/log/maillog
OCT 6 23:26:40 backup-11 sendmail[1307]: T96fqeu7001305:to=<[email protected]>, Ctladdr=<[email protected] > (500/500), delay=00:00:00, xdelay=00:00:00, MAILER=ESMTP, pri=120620, relay=163mx03.mxmail.netease.com. [220.181.14.158], dsn=5.0.0, Stat=service unavailable
OCT 6 23:26:40 backup-11 sendmail[1307]: T96FQeu7001305:t96FQeu7001307:DSN:Service unavailable
OCT 6 23:26:40 backup-11 sendmail[1307]: T96fqeu7001307:to=<[email protected]>, delay=00:00:00, xdelay=00:00:00, Mailer=local, pri=31818, dsn=2.0.0, stat=sent
OCT 6 23:26:41 backup-11 sendmail[1291]: Unable to qualify my own domain name (backup-11) – Using short name
OCT 6 23:26:41 backup-11 sendmail[1311]: T96fqf6u001309:to=<[email protected]>, Ctladdr=<[email protected] > (500/500), delay=00:00:00, xdelay=00:00:00, MAILER=ESMTP, pri=120620, relay=163mx02.mxmail.netease.com. [220.181.14.147], dsn=5.0.0, Stat=service unavailable
OCT 6 23:26:41 backup-11 sendmail[1311]: T96FQf6u001309:t96FQf6u001311:DSN:Service unavailable
OCT 6 23:26:41 backup-11 sendmail[1311]: T96fqf6u001311:to=<[email protected]>, delay=00:00:00, xdelay=00:00:00, Mailer=local, pri=31818, dsn=2.0.0, stat=sent
OCT 6 23:30:01 backup-11 sendmail[1346]: My unqualified host name (backup-11) unknown; Sleeping for retry
OCT 6 23:30:55 backup-11 sendmail[1368]: My unqualified host name (backup-11) unknown; Sleeping for retry
OCT 6 23:31:55 backup-11 sm-msp-queue[1377]: My unqualified host name (backup-11) unknown; Sleeping for retry
OCT 6 23:31:58 backup-11 sendmail[1372]: T96dlphc039178:to=<[email protected]>, Ctladdr=<[email protected] > (500/500), delay=01:44:06, xdelay=00:00:03, MAILER=ESMTP, pri=480616, relay=mta-189.21cn.com. [183.61.185.69], dsn=4.4.2, stat=deferred
OCT 6 23:32:55 backup-11 sm-msp-queue[1377]: Unable to qualify my own domain name (backup-11) – Using short name
by looking at the above log finally let me find clues, hehe, as follows:
Dsn:service unavailable
My unqualified host name (backup-11) unknown; Sleeping for retry
Unable to qualify my own domain name (backup-11) – Using short name
Stat=deferred
Stat=service unavailable
by finding the information, the solution is as follows:
1.[[email protected] ~]# vi/etc/mail/access
# of the format of this file. (Search for access_db in that file)
# package.
#
# If you want-AuthInfo with ' M:plain LOGIN ', make sure to H
Ave the
# Cyrus-sasl-plain Package installed.
#
# By default we are relaying from localhost ...
Connect:localhost.localdomain RELAY
Connect:localhost RELAY
connect:127.0.0.1 RELAY
connect:10.0.0.11 RELAY
connect:192.168.0.254 RELAY
2. Add the following lines to the/etc/hosts.allow:
Sendmail:backup-11 #主机名
sendmail:10.0.0.11 #发送邮件服务器IP地址
3. You can use the Hostanme command to temporarily modify the hostname, hostname aa.com;
4.[[email protected] ~]# vi/etc/mail/sendmail.cf
Found it:
# SMTP Daemon Options
O daemonportoptions=port=smtp,addr=127.0.0.1, Name=mta
Add to:
# SMTP Daemon Options
O daemonportoptions=port=smtp,addr= your IP, NAME=MTA
Save!
remember: After modifying hostname need to restart the SendMail service, restart the service, all OK.
This article is from the "Lanzhou Linux operation and Maintenance" blog, please be sure to keep this source http://linuxzkq.blog.51cto.com/9379412/1700544
SendMail sending mail failed on Linux system