I'm currently using Google Apps to forward mails addressed to recipients at my domain balkan-preferans.de (176.9.40.169) to my address [email protected] - this is done by the following DNS-zone served by my hoster:
$TTL 86400
@ IN SOA ns1.first-ns.de. postmaster.robot.first-ns.de. (
2012100402 ; serial
14400 ; refresh
1800 ; retry
604800 ; expire
86400 ) ; minimum
@ IN NS robotns3.second-ns.com.
@ IN NS robotns2.second-ns.de.
@ IN NS ns1.first-ns.de.
@ IN A 176.9.40.169
localhost IN A 127.0.0.1
www IN A 176.9.40.169
@ IN MX 1 ASPMX.L.GOOGLE.COM.
@ IN MX 5 ALT1.ASPMX.L.GOOGLE.COM.
@ IN MX 5 ALT2.ASPMX.L.GOOGLE.COM.
@ IN MX 10 ASPMX3.GOOGLEMAIL.COM.
@ IN MX 10 ASPMX2.GOOGLEMAIL.COM.
This has worked well for the past year, but I'd like to get rid of Google Apps, because they aren't free of cost anymore and I don't use any other features of that product.
So I'd like to change the MX-records above to point to my 2 web servers - which run 24/7 anyway.
On the servers with CentOS 6 Linux I currently run sendmail (for sending logwatch mails mainly).
Could anybody please provide some hints on which macros to add to /etc/mail/sendmail.mc
so that all mail for the balkan-preferans.de is accepted and then relayed to my address [email protected]?
Do I have to open an incoming port in iptables firewall too?
I don't think you need to mess with sendmail.mc - just add
to the /etc/mail/virtusertable and you should be good to go.
This assumes sendmail is set up to correctly receive mail for that domain, which I'm further assuming you've ensured already.