Happening:
-----------------------------------------------
1. SMTP is allowed in Linux firewall
2. /etc/hosts.allow is available in: All: Localhost
/etc/hosts.deny is available in: All: All: All: All: ALL
3. The configuration in /etc/host.conf is as follows:
# Lookup name Via DNS First The Fall Back to / etc / hosts.
ORDER BIND, HOSTS
-----------------------------------------------
Use: Mail -s Test
My@email.com Find errors in / var / log / maillog: -------------------------------------------------- ------------- Dec 29 10:36:58 rhelas3 sendmail [22236]: ibt2aw2l022236: from = root, size = 55, class = 0, nrcpts = 1, MSGID = < 20041290236.ibt2aw2l022236@localhost.localdomain>, Relay = root @ localhost Dec 29 10:36:58 rhelas3 Sendmail [22238]: IBT2AWJN022238: TCPWRAPPERS (rhelas3, 127.0.0.1) REJECTION Dec 29 10:36:58 rhelas3 sendmail [22236]: IBT2AW2L022236: To=dk@zsnet.com, ctladdr = root (0), delay = 00: 00: 00, xdelay = 00: 00: MAILER = relay, pri = 30055, relay = [127.0.1] [127.0 .0.1], DSN = 5.0.0, Stat = Service Unavailable Dec 29 10:36:58 rhelas3 sendmail [22236]: IBT2AW2L022236: IBT2AW2M022236: DSN: Service Unavailable DEC 29 10:36:58 rhelas3 sendmail [22236]: ibt2aw2m022236: to = root, delay = 00: 00: 00, xdelay = 00: 00: 00, mailer = relay, pri = 31079, relay = [127.0.0.1] , DSN = 5.0.0, Stat = Service Unavailable Dec 29 10:36:58 rhelas3 Sendmail [22236]: IBT2AW2M0222236: IBT2AW2N0222236: Return TO Sender: Service Unavailable Dec 29 10:36:58 rhelas3 sendmail [22236]: ibt2aw2n022236: to = postmaster, delay = 00: 00: 00, xdelay = 00: 00: MAILER = relay, pri = 32103, relay = [127.0.0.1] , DSN = 5.0.0, Stat = Service Unavailable Dec 29 10:36:58 rhelas3 sendmail [22236]: iBT2aw2m022236: Losing ./qfiBT2aw2m022236: savemail panicDec 29 10:36:58 rhelas3 sendmail [22236]: iBT2aw2m022236: SYSERR (root): savemail: can not save rejected email anywhere -------------------------------------------------- ------------- What is the problem? What services refer to "Service Unavailable"? ---------------------------------------- I think it is your host name DNS unable to resolve The Sendmail presets with Hostname as the host name, but your name is not aligned or looking for your machine name in Sendmail.cf, EX: DJMail.xxx.com mail.xxx.com needs to be franked by DNS and This IP -------------------------------------- Modify the host name VI / ETC / Sysconfig / Network, modify the hostname first behavior hostname = hostname, then run the "Hostname Host Name". No matter whether you restart, the host name is successful. ---------------------------------------- revised the domain name of the host named server Try or not send. >> The original reason is because /etc/hosts.allow and /etc/hosts.deny have problems. >> After coming out of /etc/hosts.deny, you can send it normally. ---------------------------------------- Telent localhost 25 can, Linux default SMTP only Bind 127.0.0.1, so you cannot access from network, you want to open SMTP, as follows: edit /etc/sendmail.cf found: # SMTP daemon options o daemonportOptions = port = SMTP, addr = 127.0.0.1, name = MTA Add : # SMTP daemon options o daemonportOptions = port = SMTP, addr = Your IP, Name = MTA Save! ---------------------------------------- The question is to set up /etc/hosts.deny settings After all: ALL, there is no sufficient authorization to Sendmail in /etc/hosts.allow. Add the following lines in /etc/hosts.allow: Sendmail: hostname (host name, not necessarily a domain name) Sendmail: Hostip (host's IP address) can be sent.