Msg#: 4405681 posted 9:23 pm on Jan 10, 2012 (gmt 0)
I run 2-3 large sites/domains, each on a separate VPS.
Each VPS/domain then uses it's local sendmail to outbound email (also used for bulk outbound email, such as newsletters). For inbound email I typically buy a mail server and hook it up via a webmail app hosted on my VPS.
In summary: outbound mail via local sendmail on VPS and inbound mail via mail server that I buy as a separate service.
Now due to the recession I can see that there is a lot of money to be saved by merging the 3 VPS' into a large cloud VPS or dedicated server.
However I am unsure how to deal with the mail issue. Since sendmail (when setup correctly) can only send mail from one domain, how would I deal with one VPS hosting multiple domains/sites that all need to send outbound mails ?
Msg#: 4405681 posted 9:42 pm on Jan 10, 2012 (gmt 0)
Sendmail sends a hostname with the HELO command to the other side when making a connection. But it is not necessary that this hostname matches one of your domains. It it mainly an identifier of the machine sending out the mail, rather than the domain which is used in the From: address. To avoid rejection while sending emails, you should make sure that this HELO hostname returns the IP address of your server if the receiving mail server performs a DNS query on it. I.e. if your sendmail sends out smtp.example.com during the HELO command, be sure that smtp.example.com returns the IP address of you server.
The second check often done--and required by the SMTP specification--is that the IP address of a sending mail server is checked for the existence of a reverse PTR record. The standard requires the existence of a PTR record, but it is not necessary that this matches the domain name sent during the HELO command or the domain name which is associated to the sender's email address.
You should therefore be able to send email from several different domains from one email server without running into problems with mismatches between your From: domain name and your server name.
If you want to increase the chances that your email arrives properly, you can implement SPF or DKIM. Both are technologies which give receiving mail servers more information to judge if emails are legitimate. SPF records protect the bounce address of an email and are practically only saying to receiving email servers that your email server with that specific IP is allowed to send emails on behalf of your bounce address domain. It protects your bounce address domain from back scatter caused by bounced spam messages. SPF doesn't say anything about the From: address. DKIM on the other hand sends an encrypted hash as a header in the message which validate the contents.
Msg#: 4405681 posted 10:14 pm on Jan 10, 2012 (gmt 0)
It is no problem if the helo address matches example1.com for emails sent from example2.com. This happens all the time, for example with Google Apps or Microsoft Office 365 sending out emails for all the domains which use their platform.
The same for problem 2. The contents of the PTR doesn't matter, only the existence is important.
To give you an idea, I just checked an email received from the Microsoft Office 365 platform:
A reverse PTR check of the IP address which belongs to the HELO name gives ch1ehsobe001.messaging.microsoft.com So the reverse PTR and HELO address are not matching in this specific case. This is perfectly allowed behavior and you should not worry too much about it.