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.
It would be interesting, instead of throwing mails away, to feed them to spamassassin, learning as spam.
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.
Thanks ! This was exactly what I was looking for. (and for the same reason, just a development environment that should never send emails)