Using aliases to forward incoming mail on Ubuntu

I only need to do this every couple years when I renew an SSL certificate and they want to verify domain ownership by sending to some non-standard address like ssladmin@example.com. So, here's how: Edit the virtual alias file:
        (sudo) vi /etc/postfix/virtual
        
Add your alias and the address(es) it forwards to:
        ssladmin@example.com   realemail@example.com
        contact@example.com    sales@gmail.com,support@gmail.com
        
Reload the postfix virtual table:
        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 didn't have that and you just added it, reload all of postfix:
        service postfix reload
        

Established 2005 · Databasically © 2016