Archive for July, 2009

Accepting mail for root@*.domain using postfix

Monday, July 27th, 2009

On the off-chance you ever have the need to accept mail for root@*.domain using postfix – maybe you’re trying to run an internal mail relay and not run sendmail on your servers – you need to look no further.

Assuming you have your root alias set correctly on your relay, all you need is:

In /etc/postfix/main.cf:
mydestination = $myhostname, $mydomain, localhost, localhost.$mydomain,
regexp:/etc/postfix/mydestination

In /etc/postfix/mydestination:
/(.*).domain$/ local