I have seen many references to this problem on server fault and all over the internet, but none of the solutions has fixed my problem.
I am running Sendmail 8.14.4 on Ubuntu 13.10, this is a webserver only (call it
domain.com) and handles no incoming or outgoing email other than to send out automated messages to users via php
mail(). Any incoming mail to
email@example.com is handled via a different server setup through an MX record and works as expected. As seems to be a frequent problem any email sent from the server to
firstname.lastname@example.org is locally routed and fails, but any other domain works as expected.
I have tried numerous solutions including adding
define(`confDONT_PROBE_INTERFACES', `True')dnl to
/etc/mail/sendmail.mc, then running
sendmailconfig and restarting sendmail. However, it does not fix the issue and on running the command
echo $=w | sendmail -bt
domain.com still appears in the list. I have removed
/etc/mail/local-host-names, but is there anywhere else I need to remove it? Do I need to remove any references in
/etc/hosts? When I run
domain.com is reported, can I change this and if I did would it cause problems with any other services?
Giving up on this solution I also tried to set up a relay by adding the following to
define(`MAIL_HUB', `example.com.')dnl define(`LOCAL_RELAY', `example.com.')dnl
However, this has also failed to fix the problem. What am I missing? I would prefer to have the email sent straight from the server if possible rather than relaying it, but at this stage any solution would be good!
I have now changed the hostname to
www.domain.com and it seems to now be hitting the mailserver correctly rather than routing locally. However I'm now getting an error saying unknown user? The mailserver has a forwarding account set up for that specific user although no actual mail box, is this a problem? I have added the log below:
Jan 27 12:13:31 www sendmail: s0RCDV3n001839: from=www-data, size=129, class=0, nrcpts=2, msgid=<201401271213.s0RCDV3n001839@www.domain.com>, relay=www-data@localhost Jan 27 12:13:32 www sm-mta: s0RCDVtW001841: from=<email@example.com>, size=401, class=0, nrcpts=2, msgid=<201401271213.s0RCDV3n001839@www.domain.com>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1] Jan 27 12:13:32 www sendmail: s0RCDV3n001839: firstname.lastname@example.org,email@example.com, ctladdr=www-data (33/33), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=60129, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s0RCDVtW001841 Message accepted for delivery) Jan 27 12:13:32 www sm-mta: STARTTLS=client, relay=spool.mail.gandi.net., version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256 Jan 27 12:13:36 www sm-mta: s0RCDVtW001841: to=<firstname.lastname@example.org>, ctladdr=<email@example.com> (33/33), delay=00:00:05, xdelay=00:00:04, mailer=esmtp, pri=150401, relay=spool.mail.gandi.net. [126.96.36.199], dsn=2.0.0, stat=Sent (Ok: queued as 378B22A89BC) Jan 27 12:13:36 www sm-mta: STARTTLS=client, relay=mail.domain.com., version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256 Jan 27 12:13:36 www sm-mta: s0RCDVtW001841: to=<firstname.lastname@example.org>, ctladdr=<email@example.com> (33/33), delay=00:00:05, xdelay=00:00:00, mailer=esmtp, pri=150401, relay=mail.domain.com. [188.8.131.52], dsn=5.1.1, stat=User unknown Jan 27 12:13:36 www sm-mta: s0RCDVtW001841: s0RCDatW001843: DSN: User unknown Jan 27 12:13:37 www sm-mta: s0RCDatW001843: to=<firstname.lastname@example.org>, delay=00:00:01, xdelay=00:00:01, mailer=local, pri=30000, dsn=2.0.0, stat=Sent
I have tested the user via a telnet connection to the mailserver and the user was accepted.