Run postfix as a blackhole mail server (open relay)

If you want to run Postfix as a blackhole mail server (accepting connection for every user on every domain) then all you have to do is add these settings to /etc/postfix/main.cf :

relayhost = 
relay_transport = relay
relay_domains = static:ALL
smtpd_end_of_data_restrictions = check_client_access static:discard

Note: Postfix is not acting as an open relay in this configuration because it discards mails and is not relaying them to the final destination.

3 thoughts on “Run postfix as a blackhole mail server (open relay)

    • Koen on said:

      Indeed! However this setup was meant to be run in a development environment, testing mail flows from different web applications and not actually sending things out to the Internet.

Leave a Reply

Your email address will not be published. Required fields are marked *