Simulate a black hole for a domain with Postfix
Software version | 2.10 |
Operating System | Debian 7 |
Website | Postfix Website |
Introduction
When you manage outgoing emails through SMTP, you may sometimes need to test if a service is able to send correctly emails and itself check that there were no issue during sending. You can create a black hole for a specific domain and Postfix will answer from the same manner as if it is ok. It also permits to test Postfix sending capacities on a server.
Installation
Of course you need Postfix:
Configuration
In the Postfix main configuration, add transport map line (/etc/postfix/main.cf
):
Now add the fake domain to the transport map file (/etc/postfix/blackhole_map
):
Let's generate the map now:
Now restart postfix and you will see in your logs something like this:
References
http://www.memoire-partagee.fr/2011/01/smtp-sortant-faire-un-trou-noir-avec-postfix/