Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 04-08-2006, 10:37 AM   #1
LQ Newbie
Registered: Feb 2005
Location: New York City
Distribution: Slackware
Posts: 22

Rep: Reputation: 15
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: I even checked the nyclug if anyone had problems with road runner. I can telnet localhost, the 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.



Here is th MAIL LOG:

Apr 8 11:04:26 darksun sendmail[22020]: k38B4QLH022020: from=<>, size=289, class=0, nrcpts=1, msgid=<>, proto=ESMTP, relay=mark@localhost
Apr 8 11:04:26 darksun sm-mta[22026]: k38B4QeX022026: from=<>, size=467, class=0, nrcpts=1, msgid=<>, proto=ESMTP, daemon=MTA, relay=localhost []
Apr 8 11:04:26 darksun sendmail[22025]: k38B4QLH022020: to=<>, ctladdr=<> (1000/100), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120289, relay=[] [], dsn=2.0.0, stat=Sent (k38B4QeX022026 Message accepted for delivery)
Apr 8 11:04:26 darksun sm-mta[22028]: k38B4QeX022026: to=<>, ctladdr=<> (1000/100), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120467, relay='', dsn=5.1.2, stat=Host unknown (Name server: '': host not found)
Apr 8 11:04:26 darksun sm-mta[22028]: k38B4QeX022026: k38B4QeX022028: DSN: Host unknown (Name server: '': host not found)
Apr 8 11:04:26 darksun sm-mta[22028]: k38B4QeX022028: to=<>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31714, dsn=2.0.0, stat=Sent


The original message was received at Sat, 8 Apr 2006 11:04:26 GMT
from localhost []

----- The following addresses had permanent fatal errors -----
(reason: 550 Host unknown)

----- Transcript of session follows -----
550 5.1.2 <>... Host unknown (Name server: '': host not

[ Part 2: "Delivery Status" ]

Reporting-MTA: dns;
Received-From-MTA: DNS; localhost
Arrival-Date: Sat, 8 Apr 2006 11:04:26 GMT

Final-Recipient: RFC822;
Action: failed
Status: 5.1.2
Remote-MTA: DNS; ''
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 <>
Subject: testing


dnl# This is the default sendmail .mc file for Slackware. To generate
dnl# the file from this (perhaps after making some changes),
dnl# use the m4 files in /usr/share/sendmail/cf like this:
dnl# cp /usr/share/sendmail/cf/
dnl# cd /usr/share/sendmail/cf
dnl# sh Build
dnl# You may then install the resulting .cf file:
dnl# cp /etc/mail/
VERSIONID(`default setup for Slackware 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', '')
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(`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(`local_procmail',`',`procmail -t -Y -a $h -d $u')dnl
dnl# Turn this feature on if you don't always have DNS, or enjoy junk mail:
dnl FEATURE(`accept_unresolvable_domains')dnl
dnl# Also accept mail for localhost.localdomain:


mark@darksun:~$ echo just a test | mail -v -s test Connecting to [] via relay...
220 ESMTP Sendmail 8.13.4/8.13.4; Sat, 8 Apr 2006 10:57:52 GMT
>>> EHLO Hello localhost [], pleased to meet you
250 HELP
>>> MAIL From:<> SIZE=214
250 2.1.0 <>... Sender ok
>>> RCPT To:<>
>>> DATA
250 2.1.5 <>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 k38Avqbt020828 Message accepted for delivery Sent (k38Avqbt020828 Message accepted for delivery)
Closing connection to []
>>> QUIT
221 2.0.0 closing connection


Starting nmap 3.93 ( ) at 2006-04-08 11:03 UTC
Interesting ports on localhost (
(The 1660 ports scanned but not shown below are in state: closed)
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 localhost darksun

[is an empty file]
Old 04-08-2006, 12:18 PM   #2
Registered: May 2004
Location: Frisco, TX
Distribution: Debian Unstable
Posts: 73

Rep: Reputation: 15
Try pinging 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.
Old 04-08-2006, 02:29 PM   #3
LQ Newbie
Registered: Feb 2005
Location: New York City
Distribution: Slackware
Posts: 22

Original Poster
Rep: Reputation: 15
Fixed-- Please Explain

Okay, I fixed this. I went directly to the etc/mail/ file--the one you are not supposed to edit directly. I noticed this line:

# "Smart" relay host (may be null)

I remember reading that the entry should be directly against the DS:

Like so:

# "Smart" relay host (may be null)

So I went back to the /usr/share/sendmail/cf/cf/ where the editing should be enter and, against everything I've ever read about, I changed

define(`SMART_HOST', '')



I simply removed the quotes

I did the standard:

cd /usr/share/sendmail/cf/cf
m4 /usr/share/sendmail/cf/m4/cf.m4 > /etc/mail/

AND PRESTO. It is working. Every example of the file show quotes. Where is the hobgoblin in the machine here?

Well, all is well.
Old 04-08-2006, 03:45 PM   #4
Registered: Dec 2005
Location: Lawrenceville GA
Distribution: Slackware, CentOS. Red Hat Enterprise Linux
Posts: 216

Rep: Reputation: 31
You got confused by the way the m4 processor handles quotes. The SMART_HOST line you had was:

define(`SMART_HOST', '')
Notice that you put the smart host name in two single quotes (') which is fine for shell scripts but bad for m4 scripts. Notice the SMART_HOST declaration uses the backtick (`) as the beginning quote and the single quote (') as the end quote. If your SMART_HOST line had been this:

define(`SMART_HOST', `')
it would have worked just fine.

It's the little things that trip you up all the time.
Old 04-09-2006, 09:51 AM   #5
LQ Newbie
Registered: Feb 2005
Location: New York City
Distribution: Slackware
Posts: 22

Original Poster
Rep: Reputation: 15
Ha, death is in the detail. Thanks for pointing this out. I love this. Learning something new everyday,
Old 08-29-2007, 01:33 AM   #6
LQ Newbie
Registered: Aug 2007
Posts: 2

Rep: Reputation: 0
DSN: Host unknown

Hi ..

me also faced the same problem....
was able to correct the issue following the post...

Shiju V.Joseph
Old 02-14-2011, 12:20 AM   #7
LQ Newbie
Registered: May 2004
Location: India
Posts: 1

Rep: Reputation: 0
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail: Unknown error 325 with LDAP bentz Linux - Networking 0 10-19-2005 02:26 PM
i m getting the error unknown host while im pinging with the host name gunjan thakkar Linux - General 2 12-14-2004 01:19 PM
Sendmail error: Unknown Address batmite Linux - Newbie 1 12-20-2003 07:46 AM
Remote host said: 550 Relaying Denied conymn Linux - Networking 4 09-10-2003 06:33 AM
Unknown sendmail log entry error robeb Linux - General 5 06-26-2003 05:23 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:11 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration