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

I'm developing on my ubuntu 9.10 machine for the web (php).
I'm using it sendmail for sending mails, and while developing on my local machine, I send local mails (to my user 'doron').

Up until a few days ago, I was able to send mails both from php's mail() function, and from the command line using the mail command.
I'm using sendmail with mailutils.

Since the last few days, it seems like it stopped working.
When I try to send mail from the command line, I get the following in my syslog (and mail.info, and mail.log):

Mar  3 13:27:58 doron-desktop sendmail[4693]: o23BRwlA004693: from=doron, size=84, class=0, nrcpts=1, msgid=<201003031127.o23BRwlA004693@doron-desktop.>, relay=doron@localhost
Mar  3 13:27:58 doron-desktop sm-mta[4694]: o23BRwtQ004694: ruleset=check_rcpt, arg1=<doron@doron-desktop>, relay=localhost [127.0.0.1], reject=553 5.1.8 <doron@doron-desktop>... Domain of sender address doron@doron-desktop does not exist
Mar  3 13:27:58 doron-desktop sendmail[4693]: o23BRwlA004693: to=<doron@doron-desktop>, ctladdr=doron (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30084, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.8, stat=User unknown
Mar  3 13:27:58 doron-desktop sm-mta[4694]: o23BRwtQ004694: from=<doron@doron-desktop>, size=84, class=0, nrcpts=0, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]

Trying to telnet locally to port 25 results in the following (same output for doron@doron-desktop):

doron@doron-desktop:/var/mail$ telnet localhost 25
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 doron-desktop. ESMTP Sendmail 8.14.3/8.14.3/Debian-9ubuntu1; Wed, 3 Mar 2010 13:26:06 +0200; (No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1]
helo localhost
250 doron-desktop. Hello localhost [127.0.0.1], pleased to meet you
mail from: doron@localhost
250 2.1.0 doron@localhost... Sender ok
rcpt to: root@localhost
553 5.1.8 root@localhost... Domain of sender address doron@doron-desktop does not exist

However - if I do the same, but use doron@127.0.0.1 in the mail from field, I get:

250 2.1.5 root... Recipient ok

My /etc/hosts file:

127.0.0.1       localhost
127.0.1.1       doron-desktop doron-desktop.

(If I don't have the "doron-desktop." (with the ending dot), the mail command takes a lot of time (around 30 seconds) until it responds, but the results are the same.)

share|improve this question
    
Is doron-desktop in local-host-names ? –  Joe Sniderman Aug 24 at 6:18

2 Answers 2

I believe that you need to change the hosts file to state:

127.0.0.1    localhost
127.0.0.1    doron-desktop

The 127.0.1.1 was introduced with Ubuntu Edgy. But some applications look for the host name to match 127.0.1.1. Sendmail is one such application. You can keep the 127.0.1.1 if you want to stick with the new standard but be sure to add 127.0.0.1 doron-desktop.

Also note the following in your error log:

ruleset=check_rcpt

After which you are told that your doron-desktop domain doesn't exist. There are different files that will allow you to set your domain name. Try setting the domain name in the following areas:

/etc/hosts
/etc/resolv.conf
sendmail conf files

You definitely need to convince sendmail that you have a domainname and that it's FQDN (even though it's not). If you have a domain name registered use (in your hosts file):

doron-desktop.somedomain.com

The server won't care that public dns doesn't point to your desktop computer. That being said, email server that you send email too might (or will) care that your desktop server is sending email on behalf of whatever domain name you put in the hosts file and may either block the emails, return them, or blacklist them (blacklisting won't happen if your just testing - you'll need to send out thousands of tests).

share|improve this answer
    
tried that, doesn't work. –  Doron Mar 3 '10 at 13:28
    
I tried to recreate the issue on a test laptop and can't do it. Someone with a better understanding of mailutils may be more helpful. Your computer definitely doesn't believe that you've defined a domain for doron-desktop. –  Patrick R Mar 3 '10 at 14:45
    
why should this happen ? how can I fix it ? –  Doron Mar 4 '10 at 9:18
    
@Doron - I added more to my answer. You need to convince sendmail that you have a FQDN. And for now don't worry that public dns doesn't truly have your doron-desktop listed as a FQDN. –  Patrick R Mar 4 '10 at 12:47

It sounds like at some point, sendmail is now checking to see if you domain is resolvable.

In that case, you can get sandmail to accept unresolvsble domains by rebuilding sendmail.cf. This involves updating sendmail.mc with the following:

FEATURE(`accept_unresolvable_domains')dnl

And then rebuild sendmail with the make command and restart sendmail:

/etc/mail/make

Be sure to have a backup of sendmail.mc and sendmail.cf before you proceed.

share|improve this answer

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.