This question already has an answer here:

We have developed a newsletter management system ... which is meant to send out bulk emails of sort.

The application rests on 1 server ... I am trying to setup an architecture best for bulk mailing - what do you recommend ?

I have tried setting up postfix with amavisd / assp (with rDNS, SPF, DKIM, DMARC) set. The postfix is configured only for smtp (out going emails). The incoming mails are routed into another server for bounce management.

What do you suggest ? Do you think amavisd is not necessary ?

Please suggest me the best stable combination / architecture for sending or legitimate mail (or mails which can go into the inbox and not spam).

Thanx !

marked as duplicate by Ward, EEAA, Rex, Tom O'Connor Jun 12 '13 at 21:29

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


I suggest not trying to roll your own solution, and instead use a service that's designed for handling bulk mailing.

There are dozens out there, and I'm sure you can find them with the power of google (try searching for "bulk smtp service", for example.)

There's lots of loopholes to jump through if you insist on doing it yourself (another wheel hastily reinvented..), to ensure that you're not blacklisted by spam authorities.


What are the requirements for the infrastructure used to send the bulk messages? Depending on the answer, some components may or may not be required. Do your messages need to be signed? (DKIM) Is TLS required? Do you need to perform any anti-virus or anti-spam checks on the messages before they go out? There are also other factors to consider such as header stripping, SPF record, etc.

Here is a quick-and-dirty configuration that may accommodate what you need to do.

  1. Multiple Postfix servers for outgoing email. Servers may run active-active or active-passive. The bulk mail application can explicitly specify a server to relay from or use internal MX record lookup.
  2. If DKIM is required, the necessary configurations within Postfix and DNS must be included. There are some books such as The Book of Postfix and the Unix & Linux System Administration Handbook that have good information on these tasks. Likely some free sources, too.
  3. Configure SPF records appropriately. (outside interface of sending server) Be sure to include A records for your HELO name and applicable PTR records.
  4. Amavis is useful if you're performing anti-virus and anti-spam. If you're controlling the source of these emails, this may not be necessary.
  5. Configure Postfix to strip headers so internal routing is not revealed.
  6. Configure TLS if necessary. If it is opportunistic, then a self-signed certificate may suffice. Many SMTP servers will establish a TLS session even if the certificate is not trusted.
  7. Limit who can relay to internet domains based on IP address. (to prevent relaying other internal applications, if necessary)
  8. Configure some monitoring. If anything, something that runs postqueue to check for high queue numbers. A lightweight SMTP server such as msmtp can be used to relay the "Queue is High" email since Postfix likely would not.

I recommend reading through the Postfix documentation on its official site to understand the capabilities/options of the software and also what part of the message pipeline they apply to. (e.g. smtp, smtpd, pickup, etc.)

Good luck!

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