I faced the problem that mails from a server got categorized as spam by certain email providers (GMX).

Therefore I followed some guidelines which did solve this problem

  • I changed the hostname of the server to mydomain.com
  • I have the reverse entry of my IP adress set to mydomain.com
  • I am using a correct envelope email address that corresponds to mydomain.com

The problem is that when I am sending an email to an adress @mydomain.com, the target host gets resolved to localhost, where the target user of course does not exist (I am using google apps mail service, externally).

Oct 5 12:43:55 flimmit sendmail[30002]: p95ChsHf030002: from=www-data, size=4217, class=0, nrcpts=1, msgid=<201110051243.p95ChsHf030002@mydomain.com>, relay=www-data@localhost Oct 5 12:43:55 flimmit sm-mta[30004]: p95ChtDl030004: ... User unknown

My question now is:

  • How can I configure sendmail so that mydomain.com gets correctly resolved to googles mailservers and not locally

OR

  • How can I configure sendmail to properly send mails, so they don't get categorized as spam, whithout changing the hostname?

Edit:

If I am not mistaken there are 3 different names involved:

  • Reverse DNS name
  • MTA name (what the mailserver identifies itself over the HELO (EHLO?) command
  • Hostname of the server

As far as I can tell the change of the hostname indirectly lead to the change of the MTA name which then resolved the spam issue.

The hostname itself however is not what needs to be changed, but what causes the probelm with undeliverable mails to local addresses.

So the the right approach could be to configure the MTA name in sendmail but leave the hostname unchanged (in my case some amazon internal hostname, I am running an EC2 instance).

Am I on the right track?

link|improve this question

feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.