Catch-All email account is used to collect all emails send to any email of a domain. Its help us to avoid loosing of emails due to misspelled addresses. While using catch-all address you may receive spam messages, and many bounces messages that sent to any-mail (at) your-domain.com .
This Tutorial will help you to setup catch-all email address with postfix server.
Step 1 – Setup Catch-All Account
A catch-all account can be created by adding a virtual aliases to the postfix server. To add an alias edit /etc/postfix/virtual configuration file:
Then add a catch-all address like below:
You may also have some actual email accounts on your domain and you need to forward emails of that accounts to correct mailbox. Then you can also create virtual alias for that email address and forward to specific users mailboxes. Use the below configuration, which will send all emails to user “myuser” except emails of [email protected] and [email protected]
myuser[email protected] info[email protected] support
Save and close configuration file, then execute the following command to create or update hash file.
Step 2 – Update Postfix Configuration File
Now, you need to add virtual_alias_maps to the Postfix main configuration file. Just edit Postfix configuration file /etc/postfix/main.cf in your favorite text editor:
Add following entry to the end of file
virtual_alias_maps = hash:
Step 3 – Reload Postfix Server
After making all the changes, reload postfix service to apply all settings. Use the following command to reload postfix configuration.
systemctl reload postfix
You have completed postfix catch-all email setting configuration. Click here to read more about catch all account.