Alexander Farber
2013-Jan-15 12:29 UTC
[CentOS] Using postfix in CentOS 6 to relay mails to First.Last@gmail.com
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
John Doe
2013-Jan-15 13:10 UTC
[CentOS] Using postfix in CentOS 6 to relay mails to First.Last@gmail.com
From: Alexander Farber <alexander.farber at gmail.com>> 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.Tried both MXs and none answered... $ telnet preferans.de 25 Trying 176.9.40.169... $ telnet static.103.78.9.176.clients.your-server.de 25 Trying 176.9.78.103... JD
Alexander Farber
2013-Jan-16 08:02 UTC
[CentOS] Using postfix in CentOS 6 to relay mails to First.Last@gmail.com
Hello - On Tue, Jan 15, 2013 at 3:05 PM, Wietse Venema <wietse at porcupine.org> wrote:> http://www.postfix.org/BASIC_CONFIGURATION_README.htmlwith CentOS 6 I've ended up adding inet_interfaces = all virtual_alias_domains = videoskat.de balkan-preferans.de to /etc/postfix/main.cf and @balkan-preferans.de First.Last at gmail.com @videoskat.de First.Last at gmail.com to /etc/postfix/virtual and then # postmap /etc/postfix/virtual # service reload postfix I've found that in http://www.postfix.org/VIRTUAL_README.html#virtual_alias Thanks Alex