SendMail sending mail failed on Linux system

Source: Internet
Author: User
Tags dsn

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 line to the/etc/hosts.allow:

sendmail:10.0.0.11  #发送邮件服务器IP地址
3. You can temporarily modify the hostname with the hostanme command, hostname aa.com;
4.[[email protected] ~]# vi/etc/mail/sendmail.cf
find:
# SMTP daemon options
Span style= "color: #000000;" >o daemonportoptions=port=smtp,addr=127.0.0.1, Name=mta
add:
Span style= "color: #000000;" ># SMTP daemon Options
o daemonportoptions=port=smtp,addr= your IP, NAME=MTA
save!

remember: After modifying the hostname, you need to restart the SendMail service, restart the service, everything OK.

Problems with SendMail sending mail under Linux system

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.