Postfix catch-all and forward to another email
Install Postfix:
sudo apt-get install postfix
Create /etc/postfix/virtual
:
mail@mydomain.dev actualmail@gmail.com
Save and run:
postmap /etc/postfix/virtual
Append to /etc/postfix/main.cf
:
virtual_alias_maps = hash:/etc/postfix/virtual
Edit inet_interfaces
in /etc/postfix/main.cf
:
inet_interfaces = all
inet_protocols = ipv4
Add to mydestination
all used domain like mail@mydomain.dev
mydestination = $myhostname, localhost.$mydomain, localhost, sub1.example.dev, sub2.example.dev, sub3.example.dev
Restart Postfix:
service postfix reload
No Comments