Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

UPDATE 10/21/2010 5p: Ok, so sending mail does work, but not sending mail to tom@wtw3.com from this box does not. The A record for wtw3.com 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 tom@wtw3.com
Subject: Test
Test
Cc: 
tom@wtw3.com... Connecting to [127.0.0.1] via relay...
220 dev.tridiumtech.com ESMTP Sendmail 8.13.8/8.13.8; Thu, 21 Oct 2010 17:02:05 -0400
>>> EHLO dev.tridiumtech.com
250-dev.tridiumtech.com 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:<root@dev.tridiumtech.com> SIZE=37
250 2.1.0 <root@dev.tridiumtech.com>... Sender ok
>>> RCPT To:<tom@dev.tridiumtech.com>
>>> DATA
550 5.1.1 <tom@dev.tridiumtech.com>... 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 [127.0.0.1] via relay...
>>> MAIL From:<> SIZE=1061
250 2.1.0 <>... Sender ok
>>> RCPT To:<root@dev.tridiumtech.com>
>>> DATA
250 2.1.5 <root@dev.tridiumtech.com>... 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 [127.0.0.1]
>>> QUIT
221 2.0.0 dev.tridiumtech.com closing connection

ORIGINAL QUESTION:

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 twilson@blahblah.com, 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 tom@blahblah.com 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:

ADDRESS TEST RESULT:

> > 3,0 fred@teaparty.net
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 . >

DNS TEST:

;; ANSWER SECTION:
teaparty.net.           3600    IN      MX      5 www.teaparty.net.
share|improve this question
2  
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 fred@teaparty.net" 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
show 6 more comments

2 Answers 2

If this is a mail from you:

Date: Thu, 21 Oct 2010 14:56:03 -0400
From: root <root@dev.tridiumtech.com>
To: reaper@teaparty.net
Subject: Test

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
1  
What's in /etc/mail/sendmail.cw and/or /etc/mail/local-host-names ? –  MadHatter Oct 21 '10 at 21:16
1  
oh, and unless you're running split-site DNS (which you may be), the MX record for wtw3.com 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 wtw3.com ; <<>> DiG 9.6.2-P2-RedHat-9.6.2-5.P2.fc12 <<>> mx wtw3.com ;; 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: ;wtw3.com. IN MX ;; ANSWER SECTION: wtw3.com. 1792 IN CNAME dev.tridiumtech.com. but now get what knitti does. propagation delay? –  MadHatter Oct 22 '10 at 6:28
add comment

(You should post the contents of sendmail.mc if it exists. sendmail.cf 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 wtw3.com, this means that your local box considers anything that is sent to anyuser@wtw3.com as mail that should be handled locally and therefore if the user does not exit, it complains. Try removing wtw3.com 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 sendmail.mc

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

Include the [] brackets.

I do not know how you produce a sendmail.cf from a new sendmail.mc 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 http://blog.postmaster.gr/2006/09/06/configuring-sendmail-for-your-unix-desktop/

share|improve this answer
    
> $=w dev.tridium-tech.com dev localhost.localdomain localhost [192.168.1.5] dev.tridiumtech.com 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 sendmail.mc and post its contents –  adamo Oct 22 '10 at 5:40
add comment

Your Answer

 
discard

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.