Sendmail Error 550 Host Unknown
I've struggled with this problem for days. I cannnot send mail to an external address with sendmail. I can receive and send local mail and I can receive external mail. I am sending out of a router. At wits end, I am providing as much information as I can imagine will be helpful to help me solve this. The stated culprit is this host unknown error. But I know the mail server smtp is correct: smtp-server.nyc.rr.com. I even checked the nyclug if anyone had problems with road runner. I can telnet localhost, the smtp-server.nyc.rr.com mailserver. I know the port 25 is open. I suspect that I need to change host server name in etc/host, but I have had no success. Is this an access file issue? Is gmail just bouncing back my mail? I want to solve this because that is what we do. I understand that I could use another application, but lets solve this one.
Thanks. -Mark Here is th MAIL LOG: Apr 8 11:04:26 darksun sendmail[22020]: k38B4QLH022020: from=<mark@darksun.kicks-ass.org>, size=289, class=0, nrcpts=1, msgid=<Pine.LNX.4.64.0604081104080.21959@darksun.kicks-ass.org>, proto=ESMTP, relay=mark@localhost Apr 8 11:04:26 darksun sm-mta[22026]: k38B4QeX022026: from=<mark@darksun.kicks-ass.org>, size=467, class=0, nrcpts=1, msgid=<Pine.LNX.4.64.0604081104080.21959@darksun.kicks-ass.org>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1] Apr 8 11:04:26 darksun sendmail[22025]: k38B4QLH022020: to=<mlgeorgiev@gmail.com>, ctladdr=<mark@darksun.kicks-ass.org> (1000/100), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120289, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k38B4QeX022026 Message accepted for delivery) Apr 8 11:04:26 darksun sm-mta[22028]: k38B4QeX022026: to=<mlgeorgiev@gmail.com>, ctladdr=<mark@darksun.kicks-ass.org> (1000/100), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120467, relay='smtp-server.nyc.rr.com', dsn=5.1.2, stat=Host unknown (Name server: 'smtp-server.nyc.rr.com': host not found) Apr 8 11:04:26 darksun sm-mta[22028]: k38B4QeX022026: k38B4QeX022028: DSN: Host unknown (Name server: 'smtp-server.nyc.rr.com': host not found) Apr 8 11:04:26 darksun sm-mta[22028]: k38B4QeX022028: to=<mark@darksun.kicks-ass.org>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31714, dsn=2.0.0, stat=Sent Here is the MESSAGE RETURNED: The original message was received at Sat, 8 Apr 2006 11:04:26 GMT from localhost [127.0.0.1] ----- The following addresses had permanent fatal errors ----- <mlgeorgiev@gmail.com> (reason: 550 Host unknown) ----- Transcript of session follows ----- 550 5.1.2 <mlgeorgiev@gmail.com>... Host unknown (Name server: 'smtp-server.nyc.rr.com': host not found) [ Part 2: "Delivery Status" ] Reporting-MTA: dns; darksun.kicks-ass.org Received-From-MTA: DNS; localhost Arrival-Date: Sat, 8 Apr 2006 11:04:26 GMT Final-Recipient: RFC822; mlgeorgiev@gmail.com Action: failed Status: 5.1.2 Remote-MTA: DNS; 'smtp-server.nyc.rr.com' Diagnostic-Code: SMTP; 550 Host unknown Last-Attempt-Date: Sat, 8 Apr 2006 11:04:26 GMT [ Part 3: "Included Message" ] Date: Sat, 8 Apr 2006 11:04:26 +0000 (UTC) From: Mark Georgiev <mark@darksun.kicks-ass.org> To: mlgeorgiev@gmail.com Subject: testing SENDMAIL.CF FILE dnl# This is the default sendmail .mc file for Slackware. To generate dnl# the sendmail.cf file from this (perhaps after making some changes), dnl# use the m4 files in /usr/share/sendmail/cf like this: dnl# dnl# cp sendmail-slackware.mc /usr/share/sendmail/cf/config.mc dnl# cd /usr/share/sendmail/cf dnl# sh Build config.cf dnl# dnl# You may then install the resulting .cf file: dnl# cp config.cf /etc/mail/sendmail.cf dnl# include(`../m4/cf.m4') VERSIONID(`default setup for Slackware Linux')dnl OSTYPE(`linux')dnl dnl# These settings help protect against people verifying email addresses dnl# at your site in order to send you email that you probably don't want: define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun,goaway')dnl dnl# Uncomment the line below to send outgoing mail through an external server: define(`SMART_HOST', 'smtp-server.nyc.rr.com') dnl# No timeout for ident: define(`confTO_IDENT', `0')dnl dnl# Enable the line below to use smrsh to restrict what sendmail can run: dnl FEATURE(`smrsh',`/usr/sbin/smrsh')dnl dnl# See the README in /usr/share/sendmail/cf for a ton of information on dnl# how these options work: FEATURE(`use_cw_file')dnl FEATURE(`use_ct_file')dnl FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access')dnl FEATURE(`blacklist_recipients')dnl FEATURE(`local_procmail',`',`procmail -t -Y -a $h -d $u')dnl FEATURE(`always_add_domain')dnl FEATURE(`redirect')dnl dnl# Turn this feature on if you don't always have DNS, or enjoy junk mail: dnl FEATURE(`accept_unresolvable_domains')dnl EXPOSED_USER(`root')dnl dnl# Also accept mail for localhost.localdomain: LOCAL_DOMAIN(`localhost.localdomain')dnl MAILER(local)dnl MAILER(smtp)dnl MAILER(procmail)dnl MAIL -V COMMAND TEST mark@darksun:~$ echo just a test | mail -v -s test mlgeorgiev@gmail.com mlgeorgiev@gmail.com... Connecting to [127.0.0.1] via relay... 220 darksun.kicks-ass.org ESMTP Sendmail 8.13.4/8.13.4; Sat, 8 Apr 2006 10:57:52 GMT >>> EHLO darksun.kicks-ass.org 250-darksun.kicks-ass.org Hello localhost [127.0.0.1], pleased to meet you 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-8BITMIME 250-SIZE 250-DSN 250-ETRN 250-DELIVERBY 250 HELP >>> MAIL From:<mark@darksun.kicks-ass.org> SIZE=214 250 2.1.0 <mark@darksun.kicks-ass.org>... Sender ok >>> RCPT To:<mlgeorgiev@gmail.com> >>> DATA 250 2.1.5 <mlgeorgiev@gmail.com>... Recipient ok 354 Enter mail, end with "." on a line by itself >>> . 250 2.0.0 k38Avqbt020828 Message accepted for delivery mlgeorgiev@gmail.com... Sent (k38Avqbt020828 Message accepted for delivery) Closing connection to [127.0.0.1] >>> QUIT 221 2.0.0 darksun.kicks-ass.org closing connection CHECKING PORTS Starting nmap 3.93 ( http://www.insecure.org/nmap/ ) at 2006-04-08 11:03 UTC Interesting ports on localhost (127.0.0.1): (The 1660 ports scanned but not shown below are in state: closed) PORT STATE SERVICE 21/tcp open ftp 22/tcp open ssh 25/tcp open smtp 80/tcp open http 587/tcp open submission 5800/tcp open vnc-http 5900/tcp open vnc 6000/tcp open X11 /ETC/HOST FILE 127.0.0.1 localhost 127.0.0.1 darksun.kicks-ass.org darksun ETC/MAIL/ACCESS FILE [is an empty file] |
Try pinging smtp-server.nyc.rr.com and see if you can resolve that hostname. Your machine is relaying all mail to that host and it cannot resolve it. If you can't resolve it, it's a dns issue somewhere. Last resort would be to put the hostname/ip in your /etc/hosts file.
24.29.102.150 smtp-server.nyc.rr.com |
Fixed-- Please Explain
;)
Okay, I fixed this. I went directly to the etc/mail/sendmail.cf file--the one you are not supposed to edit directly. I noticed this line: # "Smart" relay host (may be null) DS'smtp-server.nyc.rr.com' I remember reading that the entry should be directly against the DS: Like so: # "Smart" relay host (may be null) DSsmtp-server.nyc.rr.com So I went back to the /usr/share/sendmail/cf/cf/sendmail-slackware.mc where the editing should be enter and, against everything I've ever read about sendmail.cf, I changed define(`SMART_HOST', 'smtp-server.nyc.rr.com') To: define(`SMART_HOST', smtp-server.nyc.rr.com) I simply removed the quotes I did the standard: cd /usr/share/sendmail/cf/cf cp sendmail-slackware.mc config.mc m4 /usr/share/sendmail/cf/m4/cf.m4 config.mc > /etc/mail/sendmail.cf AND PRESTO. It is working. Every example of the sendmail.cf file show quotes. Where is the hobgoblin in the machine here? Well, all is well. |
You got confused by the way the m4 processor handles quotes. The SMART_HOST line you had was:
Quote:
Quote:
It's the little things that trip you up all the time. |
Ha, death is in the detail. Thanks for pointing this out. I love this. Learning something new everyday,
|
DSN: Host unknown
Hi ..
me also faced the same problem.... was able to correct the issue following the post... cheers Shiju V.Joseph |
This post has helped me in resolving the DNS issue. Definition of SMART_HOST shud be taken care with utmost care.
define(`SMART_HOST', `smtp-server') or define(`SMART_HOST', smtp-server) Thanks a lot MarcusG |
Host unknown (Name server: xxx.xxxx.xxxx.xxxx: host not found)
Jan 20 10:51:43 brookfieldse4 sendmail[29793]: 00KFphXK029793: from=<example@example.com>, size=1465, class=0, nrcpts=1, msgid=<1255396461.1579535503361.JavaMail.delfour@machinename4>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Jan 20 10:51:43 brookfieldse4 sendmail[29795]: 00KFphXK029793: to=<example@example.com>, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=121465, relay=xxxx.xxxx.xxxxx.xxxxx, dsn=5.1.2, stat=Host unknown (Name server: xxxx.xxxx.xxxx.xxxx: host not found) Jan 20 10:51:43 brookfieldse4 sendmail[29795]: 00KFphXK029793: 00KFphXK029795: DSN: Host unknown (Name server: xxxx.xxxx.xxxx.xxxx: host not found) Jan 20 10:51:43 brookfieldse4 sendmail[29795]: 00KFphXK029795: to=<EDI@novacold.com>, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32707, relay=Offcie365, dsn=5.1.2, stat=Host unknown (Name server: Office365smtpserver: host not found) |
All times are GMT -5. The time now is 04:37 AM. |