Setup Postfix to catch every Domain email using 'virtual'

Postfix has useful feature where you can configure it to capture all emails destined for a particular domain. Just do this:

Question: How do you setup a catch-all email account under the Postfix MTA?

Postfix has useful feature where you can configure it to capture all emails destined for a particular domain. Just do this:


	# echo "@yourdomain.com		username" >> /etc/postfix/virtual

	# echo "virtual_alias_maps = hash:/etc/postfix/virtual" >> \
           /etc/postfix/main.cf

	# postmap /etc/postfix/virtual

	# service postfix reload



Now you should get all mail that escapes normal delivery to the address you have just configured!


Peace be unto you. Thank you for visiting!