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.

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 Sheevok.com. I'm currently trying to make it so that any e-mail directed to "Sion@Sheevok.com" goes to my personal e-mail account, "SionSheevok@Gmail.com".

For that matter, is there anyway to reroute any e-mail sent with a domain name of "Sheevok.com" to "SionSheevok@Gmail.com" by default?

share|improve this question
add comment

4 Answers

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/main.cf (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:
Sheevok.com DOMAIN
@Sheevok.com SionSheevok@Gmail.com
Sion@Sheevok.com SionSheevok@Gmail.com

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 main.cf: virtual_alias_maps = hash:/etc/postfix/virtual_addresses I added the folowing to virtual_addresses: Sheevok.com DOMAIN sion@sheevok.com sionsheevok@gmail.com @sheevok.com sionsheevok@gmail.com 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 Lawrie Sep 26 '10 at 15:46
add comment

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

http://www.postfix.org/VIRTUAL_README.html#forwarding

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

share|improve this answer
    
I added the following to main.cf: virtual_alias_domains = sheevok.com virtual_alias_maps = hash:/etc/postfix/virtual I added the folowing to virtual: sion@sheevok.com sionsheevok@gmail.com @sheevok.com sionsheevok@gmail.com 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
add comment

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
add comment

A much easier way to do this is to use PointHQ.com 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
add comment

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.