Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

UPDATE 10/21/2010 5p: Ok, so sending mail does work, but not sending mail to from this box does not. The A record for points to the development box, but the MX records resolve to Google's servers. Is this causing the issue? How do I tell? (Verbose mail output below)

[root@dev ~]# mail -v
Subject: Test
Cc: Connecting to [] via relay...
220 ESMTP Sendmail 8.13.8/8.13.8; Thu, 21 Oct 2010 17:02:05 -0400
>>> EHLO Hello localhost [], pleased to meet you
250 HELP
>>> MAIL From:<> SIZE=37
250 2.1.0 <>... Sender ok
>>> RCPT To:<>
>>> DATA
550 5.1.1 <>... User unknown
503 5.0.0 Need RCPT (recipient)
>>> RSET
250 2.0.0 Reset state
>>> RSET
250 2.0.0 Reset state
root... Using cached ESMTP connection to [] via relay...
>>> MAIL From:<> SIZE=1061
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 o9LL25mA024437 Message accepted for delivery
root... Sent (o9LL25mA024437 Message accepted for delivery)
Closing connection to []
>>> QUIT
221 2.0.0 closing connection


I am having problems when sending mail OUT from my development server.

Unless I send mail TO a user that begins with a username that exists on my box, the mail will reject and say "User unknown".

For instance, I have a user on my dev box called "twilson". Therefore, I can send email to any address that begins with "twilson", such as, and it will send without any issue.

But, I do not have a user "tom" on my box, so when I go to send email to it will reject saying:

Oct 21 10:07:49 dev sendmail[19638]: o9LE7mcV019638: < tom@localhost >... User unknown

It actually takes whatever the username of the emailing address I am sending TO is and places it on the local hostname.

Why is it doing this??? How can I correct the configuration so that I can send OUT to ANYONE?

Thanks, Tom

Additional Info:


> > 3,0
canonify           input: fred @ teaparty . net
Canonify2          input: fred < @ teaparty . net >
Canonify2        returns: fred < @ teaparty . net . >
canonify         returns: fred < @ teaparty . net . >
parse              input: fred < @ teaparty . net . >
Parse0             input: fred < @ teaparty . net . >
Parse0           returns: fred < @ teaparty . net . >
ParseLocal         input: fred < @ teaparty . net . >
ParseLocal       returns: fred < @ teaparty . net . >
Parse1             input: fred < @ teaparty . net . >
Mailertable        input: < teaparty . net > fred < @ teaparty . net . >
Mailertable        input: teaparty . < net > fred < @ teaparty . net . >
Mailertable      returns: fred < @ teaparty . net . >
Mailertable      returns: fred < @ teaparty . net . >
MailerToTriple     input: < > fred < @ teaparty . net . >
MailerToTriple   returns: fred < @ teaparty . net . >
Parse1           returns: $# esmtp $@ teaparty . net . $: fred < @ teaparty . net . >
parse            returns: $# esmtp $@ teaparty . net . $: fred < @ teaparty . net . >


;; ANSWER SECTION:           3600    IN      MX      5
share|improve this question
Sendmail definitely shouldn't do that. What OS/distro are you using? Can you let us have the m4 from which the sendmail config was generated? – MadHatter Oct 21 '10 at 14:57
It would also be helpful to see the output of sendmail in address test mode. Could you bear to run "sendmail -bt -d0,11" , when you get the ">" prompt say "3,0" and paste the results of the whole thing in here? – MadHatter Oct 21 '10 at 14:59
Have you thought about switching to Postfix? – gravyface Oct 21 '10 at 15:01
MH: It is CentOS release 5 (Final). I'm not sure what m4 is, sorry. I'm a sendmail rookie. I added the address test results to the question. Thanks. – TomWilsonFL Oct 21 '10 at 15:14
gravy: Not planning on switching when I know sendmail should work fine. This box is ancient. Don't need to put more packages on it. – TomWilsonFL Oct 21 '10 at 15:14

If this is a mail from you:

Date: Thu, 21 Oct 2010 14:56:03 -0400
From: root <>
Subject: Test


which based on your profile I suspect it is, then whatever the problem on your system, it's not with sendmail. Your sendmail is configured fine as regards outbound email.

That said, clearly something doesn't work, or you wouldn't have posted. Would you care to edit your question, or open a new one, saying what you know (what you're trying to achieve, what you're doing, what's happening), rather than what you think might be the underlying cause?

share|improve this answer
Edited the question. I hope it makes sense. I'm over obscuring the hostname. If anyone is that desperate to break into my little dev box, let them try. There isn't anything great on it anyway. lol ;) – TomWilsonFL Oct 21 '10 at 21:05
What's in /etc/mail/ and/or /etc/mail/local-host-names ? – MadHatter Oct 21 '10 at 21:16
oh, and unless you're running split-site DNS (which you may be), the MX record for doesn't point to google; there is no MX record. i'd cut and paste some DNS output here, but cut-and-paste is really not well-supported in comments. – MadHatter Oct 21 '10 at 21:18
interesting; i got [madhatta@risby financial]$ dig mx ; <<>> DiG 9.6.2-P2-RedHat-9.6.2-5.P2.fc12 <<>> mx ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26544 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ; IN MX ;; ANSWER SECTION: 1792 IN CNAME but now get what knitti does. propagation delay? – MadHatter Oct 22 '10 at 6:28

(You should post the contents of if it exists. is produced by m4 after reading it)

Run sendmail -bt (test mode). While in there, type $=w to inspect the contents of the variable. If the contents of the variable include, this means that your local box considers anything that is sent to as mail that should be handled locally and therefore if the user does not exit, it complains. Try removing from /etc/mail/local-host-names if it is there

(BTW from what I understand the machine seems to be configured to believe that for every domain name the Kuser database should be checked for the LHS of the address before attempting to send email)

One quick hack to avoid this is to define the following in your

define(LUSER_RELAY, `[one of the Google MX]')dnl

Include the [] brackets.

I do not know how you produce a from a new for your distribution. In Debian I run sendmailconfig.

A more appropriate configuration for your machine, would be to either use FEATURE(nullclient) or a variation of

share|improve this answer
> $=w dev localhost.localdomain localhost [] Is what appears when I do "$=w". There are no entries in the local-host-names file. – TomWilsonFL Oct 21 '10 at 23:35
locate and post its contents – adamo Oct 22 '10 at 5:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.