Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

To catch all mail sent to myexample.com and forward it to another address we use the following in virtual:

@myexample.com myexample@gmail.com

However, we would like to keep all mail sent locally to the user root on the server, and do not want to forward it anywhere. (It's okay not to forward any root@myexample.com mail from other sources as well)

How can we achieve this?

share|improve this question

1 Answer 1

Your /etc/postfix/virtual should be

root@myexample.com       any_local_user
@myexample.com myexample@gmail.com
share|improve this answer
    
Now I get this: ... postfix/error[7714]: ...: to=<root@myexample.com>, orig_to=<root>, relay=none, delay=0.01, delays=0.01/0/0/0, dsn=5.1.1, status=bounced (User unknown in virtual alias table) –  Udi Mar 2 at 20:07
    
can u post your postconf -n output? –  clement Mar 2 at 21:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.