I'm trying to set up the redirection of all emails to my VPS to my Gmail account because it's easier to handle. At the moment though, it is not working, and I can't see why.
I have tried a few solutions from the Internet but none have worked so far (I tell you this because I realize there may be a chance that things are conflicting). My VPS is running on CentOS 5.
Postfix is the most popular solution, and this is what I have done:
Edited /etc/postfix/main.cf to add:
virtual_alias_domains = mydomain.com virtual_alias_maps = hash:/etc/postfix/virtual
Created /etc/postfix/virtual and added:
firstname.lastname@example.org email@example.com @mydomain.com firstname.lastname@example.org
service postfix reloadand
service postfix restart
There is nothing in my
/var/log/maillog but the only contents is the activity of me restarting the server etc. As a side note, if I send mail from the server command line to
email@example.com, it redirects to my Gmail.
Am I doing anything obviously wrong? I followed an article to the letter on this and many other articles recommend the same or a very similar process. If you need any more info then I will be happy to give it to you - any help is greatly appreciated.