I'm currently setting up a mail server for mass mailing on a non-profit. I decided to go with Postfix since I had some experience with the configuration. However my experience was for multi domain environments backed by a MySQL DB not a mass mailing solution.

What I'm trying to accomplish needs to meet the following:

  1. SMTP server that allows to send emails from any email address / domain they choose;
  2. Only allow to send the emails with those domains from the server itself, to avoid running this as an open-relay and have spam issues;
  3. Still have a virtual_aliases, mailbox-domains, mailbox-maps configuration based on a MySQL DB so I can create internal emails @massmail.example to use as email bounce / return path to track errors;

My current config is a multi domain environment, I'm able to add domains and users into the MySQL DB like [email protected], connect to SMTP, send mail and receive over IMAP. Everything works fine.

However, how am I supposed to implement the part: "send emails from any email address / domain they choose"?

To send emails from [email protected], should I:

  1. Add the domain non-profit.com to the virtual_domains table and create the user [email protected] at the virtual_users, login with that address and send the emails?
  2. Login with the internal bounce email [email protected] use it to send email but change the FROM header to [email protected]?

What's the correct options in terms of SPAM detection bulk sending compliance? Any of the above or something else? How does platforms like mail chimp handle this?

I tried the option (2) and gmail, for instance, says something like this: enter image description here

  • 1
    For mass mailing you should probably use a mail list application (or a 3rd party service), and not implement your own.
    – Rabin
    Commented Nov 22, 2015 at 16:30
  • 1
    @Rabin not possible due to budget.
    – TCB13
    Commented Nov 23, 2015 at 16:37
  • some services (like mailchimp) will give a free usage if the list is < 2000 or 12000 mails per month.
    – Rabin
    Commented Nov 23, 2015 at 22:01
  • 1
    @Rabin I had this discussion with them already, not worth it. I really want to do this for them and for me, it still has a big learning curve.
    – TCB13
    Commented Nov 24, 2015 at 13:23

1 Answer 1


You cannot have mass mailing, without SPAMMING, unless users have registered, and approved their email address, or any other 2 factor acknowledgment.

Restrict MTA to IP, edit main.cf and add the IP's you wish to send from. i.e... inet_interfaces = public-ip,

create a generic map for the different domains they wish to send from. see for example: http://www.cyberciti.biz/tips/howto-postfix-masquerade-change-email-mail-address.html

  • Yes, I'll ask permission to send email. Users will sign physical a form with other stuff and they have an option to opt out... The same option will be send at the bottom of every email. Thanks for the reply I'll take a look at the link.
    – TCB13
    Commented Nov 23, 2015 at 15:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .