You are not logged in.
Login or Register

Tip: Create a super "catch-all" email address in Postfix

Posted By: apeiro

This mini-HOWTO shows you how to setup a virtual alias map that can redirect mail to any address into a remote catch-all address.

First, set the following directives in /etc/postfix/main.cf:

virtual_alias_maps = regexp:/etc/postfix/virtual
virtual_alias_domains =

Second, edit /etc/postfix/virtual to send everything to your catchall address:

/.*/  catchall@gmail.com

Now rebuild the map file and restart postfix:

# postmap /etc/postfix/virtual
# /etc/rc.d/postfix restart

Test your setup by sending mail to some random address. It should arrive at your catch-all address. Watch /var/log/mail.log for success/errors.

$ echo "testing" | mail -s "test" john@example.com