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

I'm from a non-networking programming background, so please forgive me if any of my terminology is off.

A friend and I have a virtual private server. On that virtual private server, we host a small handful of sites through virtual hosting, each with its own domain name. My domain name is I'm currently trying to make it so that any e-mail directed to "" goes to my personal e-mail account, "".

For that matter, is there anyway to reroute any e-mail sent with a domain name of "" to "" by default?

share|improve this question

4 Answers 4

Sorry for the cross answer @sysadmin1138, but I find that documentation confusing personally so I wanted to clarify.

Add the following line to /etc/postfix/ (if you're using something other than postfix you need to be more specific):
virtual_maps = hash:/etc/postfix/virtual_addresses
Then put the following in /etc/postfix/virtual_addresses: DOMAIN

There's duplication in there just to show you how to do it. You could add another DOMAIN underneath also. Next run the following two commands:
postmap /etc/postfix/virtual_addresses
/etc/init.d/postfix restart

share|improve this answer
I also attempted this method. – Sion Sheevok Sep 26 '10 at 5:25
I added the following to virtual_alias_maps = hash:/etc/postfix/virtual_addresses I added the folowing to virtual_addresses: DOMAIN Executed: postmap /etc/postfix/virtual_addresses /etc/init.d/postfix restart Sent an e-mail to the address, didn't receive anything within an hour. No luck either. Something I'm missing I assume. – Sion Sheevok Sep 26 '10 at 5:28
Type tail -f /var/log/maillog and try sending an email to yourself again. Watch the new entries to the maillog and paste those here. If this is a Plesk server it will be in /usr/local/psa/var/log/maillog – James L Sep 26 '10 at 15:46

Most mailers do support this kind of functionality. It's called a forward. For instance, Postfix configures this in /etc/postfix/virtual (usually):

The settings in there will map to Mail to will still be handled by the mailer, but it will end up in gmail.

share|improve this answer
I added the following to virtual_alias_domains = virtual_alias_maps = hash:/etc/postfix/virtual I added the folowing to virtual: Executed: postmap /etc/postfix/virtual postfix reload Sent an e-mail to the address, didn't receive anything within an hour. No luck... perhaps something I'm doing wrong? – Sion Sheevok Sep 26 '10 at 5:23

Unless you need the email to hit your vps this would be handled easiest by checking with your name registrar and seeing what options they have for forwarding your email. Most of them will allow you to forward/redirect email.

share|improve this answer

A much easier way to do this is to use for your domain's DNS and they offer a email redirection service so @ would be sent to another email address of your choice.

share|improve this answer

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.