homepage Welcome to WebmasterWorld Guest from 54.205.98.35
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
Hosting many domains on one VPS - How to handle mail ?
darkage




msg:4405683
 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 ?

How do you guys do it ?

Thank in advance for help.

 

darkage




msg:4405685
 9:24 pm on Jan 10, 2012 (gmt 0)

Allow me to provide an example:

VPS is hosting example1.com and example2.com

Both sites uses sendmail to send out bulk newsletters.

sendmail is configured to represent example1.com properly, so no emails sent from example1.com will be rejected by the receiver.

if example2.com uses sendmail, the receiver might reject it due to PTR, header checks, etc.

What's the best way to address this ?

lammert




msg:4405689
 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.

darkage




msg:4405698
 9:54 pm on Jan 10, 2012 (gmt 0)

The hostname sent is taken from the j macro, which in my case is example1.com

PTR record is also mapping my ip to example1.com

Problem 1:
If example2.com uses sendmail, the hostname used with helo will be example1.com

Problem 2
If mail is sent out from example2.com and the receiving mail provider checks PTR record for my ip it will map to example1.com

How would this be addressed ?

lammert




msg:4405705
 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:

HELO ch1outboundpool.messaging.microsoft.com
Return-path: user@example.com
From: user@example.com

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.

darkage




msg:4405942
 6:19 pm on Jan 11, 2012 (gmt 0)

Thanks for the update. If that's the case then there is good value in joining all the stand-alone VPS' into a single powerful cloud/VPS/dedicated server and let all sites share sendmail.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved