Q. How do I setup cacth-all email accounts under Postfix MTA? For example if an email send to email@example.com, firstname.lastname@example.org and email@example.com, should be sent to the same email address.
This is useful if anyone of user mistypes an email address when they send it to me, or just guesses at a valid email address, then they will likely get an error message from my server such as user / email mail box does not exist. So I wish to set up a “catch all” address
A. Mapping is done using /etc/postfix/virtual file.
# vi /etc/postfix/virtual
Append code as follows, replacing domain and emailusername with actual values:
Save and close the file. Run following command:
# postmap /etc/postfix/virtual
Also make sure you have following line in /etc/postfix/main.cf file:
virtual_alias_maps = hash:/etc/postfix/virtual
If you just added above, line reload postfix:
# service postfix reload
Caution: if you set up a catch-all email address, you will likely receive more unsolicited (spam) email.Share this tutorial on: