OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Accepting mail for *.mydomain.com

From: Victor Duchovni (Victor.DuchovniMorganStanley.com)
Date: Wed Nov 22 2006 - 17:51:36 CST


On Thu, Nov 23, 2006 at 12:21:42AM +0100, mouss wrote:

> Nico De Ranter wrote:
> >Hi,
> >
> >I'm getting 'mail for ... loops back to me' errors when sending mails to
> >userserver.mydomain.com. I know I can fix this by adding
> >server.mydomain.com to the relaydomains file (or by fixing the server
> >but I don't control all servers). However the number of servers is large
> >and changes frequently. Is there any way to make postfix accept all mail
> >for *.mydomain.com? I tried adding *.mydomain.com to the relaydomains
> >file but that didn't work.
> >

To treat all subdomains as local:

    /etc/postfix.main.cf
        mydoman = example.com
        mydestination =
                $mydomain,
                localhost.$mydomain,
                # :-)
                regexp:${config_directory}/sendmail.cw

    /etc/postfix/sendmail.cw
            /\.example\.com$/ local

With other address classes, you run into serious recipient validation
issues, because you need recipient tables that match userhost for each
possible user and host... This requires a policy daemon for correct
recipient validation. Postfix can't yet do envelope rewriting first
and recipient validation second.

--
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majordomopostfix.org?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.