[CentOS] Using postfix in CentOS 6 to relay mails to First.Last at gmail.com

Alexander Farber alexander.farber at gmail.com
Tue Jan 15 12:29:59 UTC 2013


Hello fellow CentOS users,

I'm using:

# cat /etc/*release
CentOS release 6.3 (Final)

# rpm -qa | grep post
postfix-2.6.6-2.2.el6_1.x86_64

on 2 servers: preferans.de and (yes, funny name)
static.103.78.9.176.clients.your-server.de

I own several domains and would like all
incoming mails addressing those domains
to be forwarded to my Gmail address.

So I have setup the MX-records for my domains:

# host videoskat.de
videoskat.de has address 176.9.40.169
videoskat.de mail is handled by 100 static.103.78.9.176.clients.your-server.de.
videoskat.de mail is handled by 10 preferans.de.

# host balkan-preferans.de
balkan-preferans.de has address 176.9.40.169
balkan-preferans.de mail is handled by 100
static.103.78.9.176.clients.your-server.de.
balkan-preferans.de mail is handled by 10 preferans.de.

And at the both servers I have added:

# head /etc/postfix/virtual
@balkan-preferans.de First.Last at gmail.com
@videoskat.de First.Last at gmail.com

# postmap /etc/postfix/virtual

# postmap -q "@videoskat.de" /etc/postfix/virtual
First.Last at gmail.com


And have opened port 25 in the firewall:

# grep -w 25 /etc/sysconfig/iptables
-A INPUT -p tcp -m state --state NEW -m tcp -m multiport --dports
25,22 -j ACCEPT

But now when I send a mail to spam at videoskat.de
there is nothing to see in postfix logs:

# sudo tail /var/log/maillog
Jan 15 10:50:42 postfix/postfix-script[1401]: starting the Postfix mail system
Jan 15 10:50:42 postfix/master[1402]: daemon started -- version 2.6.6,
configuration /etc/postfix

So I'm probably missing something?

BTW the daily logwatch mails arrive
from both servers just fine at my
Gmail-mailbox First.Last at gmail.com

Regards
Alex



More information about the CentOS mailing list