Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I would like to forward all email sent to non-existant users on my fedora server to my gmail account. Is there a simple way to do this?

How would I forward all email?

share|improve this question

2 Answers 2

Set "mydestination=" in to include the domains that you receive mail for. You will need to make sure that each of those resolves correctly in DNS, I believe.

Then add or edit "virtual_alias_maps" in to look like this:

virtual_alias_maps = hash:/etc/postfix/virtual

Then add the domains to /etc/postfix/virtual:

run postmap /etc/postfix/virtual

and restart postfix if you edited at all.

This will forward mail sent to and to your gmail account.

share|improve this answer

Did you try to read Postfix docs? Postfix Virtual Domain Hosting Howto is your best friend, Mail forwarding domains chapter, if I'll show topic-for-you

 1 /etc/postfix/
 2     virtual_alias_domains = ...other hosted domains...
 3     virtual_alias_maps = hash:/etc/postfix/virtual
 5 /etc/postfix/virtual:
 6 postmaster
 7        joe@somewhere
 8       jane@somewhere-else
 9     # Uncomment entry below to implement a catch-all address
10     #         jim@yet-another-site

Line 10: The commented out entry (text after #) shows how one would implement a catch-all virtual alias that receives mail for every address not listed in the virtual alias file

RTFM, "postmaster"

share|improve this answer
I wanted to forward mail from any domain. – Richard - Rogue Wave Limited Mar 1 '12 at 14:07
@Richard-RogueWaveLimited - add one wildcarded alias for every domain in virtual_alias_domains – Lazy Badger Mar 1 '12 at 14:19

Your Answer


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.