Postfix setup catch-all email accounts using /etc/postfix/virtual

ww‮ruttual.w‬i.com
Postfix setup catch-all email accounts using /etc/postfix/virtual

To set up a catch-all email account using the /etc/postfix/virtual file in Postfix, you will need to follow these steps:

  1. Edit the /etc/postfix/virtual file and add a line for the catch-all account. The syntax is:
@domain.com username

Replace domain.com with the domain that you want to catch all emails for, and username with the username of the catch-all account. For example, to catch all emails sent to @example.com, you would add the following line:

@example.com catchall
  1. Add the virtual alias mapping to the /etc/postfix/main.cf file by adding the following line:
virtual_alias_maps = hash:/etc/postfix/virtual
  1. Reload the Postfix configuration to apply the changes:
sudo service postfix reload

That's it! Postfix should now be configured to catch all emails sent to the specified domain and deliver them to the catch-all account.

Created Time:2017-10-30 14:27:12  Author:lautturi