1

I'm looking to set up a webmail server that will be used by a lots of users that will receive and send emails. They will also have the possibility to forward emails they receive.

I'd like to know which steps are recommanded/required to indicate to others Mail services (GMail, Outlook, etc) that my server is not used as a spam sender (disclaimer : IT's NOT ! :p) but a legitimate one.

I know I have to define a SPF TXT records for example, but what others steps would you recommend me to do ?

For example, is there a formula like having a proportional number of servers based on the amount of email sent (for having a different IP address) ? (something like sending a maximum of 1M emails / per IP / per day ?)

Something else I'm missing ?

I tried to search online, but I mostly find how to avoid emails sent with scripts (like PHP) being put in the SPAM folder.

I'm looking for a server/dns configuration side.

Thanks a lot for your help/tips, I appreciate !

3
  1. Ensure your server is not an open relay, meaning that it must not relay to arbitrary destinations for arbitrary senders without authentication.
  2. Make sure that your SMTP software is configured to send an appropriate FQDN along with its HELO/EHLO statement. Configuration will depend on the SMTP server you are running, but you need to make sure it is identifying itself with a publicly-resolvable fully qualified domain name.
  3. Make sure you have an A/AAAA record in DNS for the FQDN noted in step 2, with the correct IP mapped to your server.
  4. Make sure there is a PTR record corresponding to your A/AAAA record.
  5. Make sure that the SPF record(s) for any domain that will send through your server are configured to allow that server as a sender.
  6. Potentially set up DKIM, depending on your server software and requirements.
  7. If you run into trouble, check your server's external IP(s) against various online blacklists.
  8. MOST IMPORTANTLY: If you can use an external service for SMTP like MailGun, SendGrid, etc, consider doing so. SMTP is one of those things like DNS in that for most people/businesses, running it themselves is really more trouble than it's worth.
3

The first step is to make sure you don't have an open relay. You can test that here. Other measures will also have to be taken, but those settings will be dependent on the mailserver you're running.

  • Thanks for this answer, I already knew about this server but didn't knew about being an open relay, very interesting! And about the servers in question, do you recommand me to take 1/2/n amazon ec2 instances or is it ok (or the same) to take a private server? I can't make my mind regarding if Amazon is better (reliable network = less spam quality mail) or bad (lot's of server, probably lost of spammers) ? – Cyril N. Oct 25 '13 at 9:42
  • I haven't worked much with amazon, but do run a mailserver. Mailservers can be a headache esp with spam, so if you have the opportunity to get somebody else to manage it, I'd recommend that route. – Gevious Oct 25 '13 at 11:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.