LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 04-08-2006, 10:37 AM   #1
MarcusG
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: 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]
 
Old 04-08-2006, 12:18 PM   #2
Draygo
Member
 
Registered: May 2004
Location: Frisco, TX
Distribution: Debian Unstable
Posts: 73

Rep: Reputation: 15
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
 
Old 04-08-2006, 02:29 PM   #3
MarcusG
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/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.
 
Old 04-08-2006, 03:45 PM   #4
centauricw
Member
 
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:

Quote:
define(`SMART_HOST', 'smtp-server.nyc.rr.com')
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:

Quote:
define(`SMART_HOST', `smtp-server.nyc.rr.com')
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
MarcusG
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
shijujoe
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...

cheers
Shiju V.Joseph
 
Old 02-14-2011, 12:20 AM   #7
syskarthik
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
 
  


Reply


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


All times are GMT -5. The time now is 11:21 PM.

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