0

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?

4 Answers4

1

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

James L
  • 6,025
  • 1
  • 22
  • 26
  • I also attempted this method. – Sion Sheevok Sep 26 '10 at 05: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 05: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
0

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.

sysadmin1138
  • 133,124
  • 18
  • 176
  • 300
  • 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 05:23
0

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.

womble
  • 96,255
  • 29
  • 175
  • 230
0

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.

ErnieTheGeek
  • 2,037
  • 16
  • 22