OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Subject: Re: receiving mail for *.myname.com
From: Wietse Venema (wietseporcupine.org)
Date: Tue Jul 04 2000 - 16:25:31 CDT


Szymon Grabowski:
> Hi,
>
> I'd like postfix to receive e-mails for any_sub-domain.myname.com.
> (where myname is my domain name)
>
> By 'any_sub-domain' I don't mean a set of sub-domains, but really
> "anything": *
>
> Right now, when I try to send e-mail to somethingsomething.myname.com,
> I get a rather unhappy error message:
>
> ----- Transcript of session follows -----
> 550 <somethingsomething.myname.com>... Host unknown (Name server:
> something.myname.com: host not found)
>
> Is such a *.myname.com set up possible with postfix and, if so,
> what do I have to do to make it work for me? :)

Warning, untested example follows.

/etc/postfix/main.cf:
    mydestination = .... regexp:/etc/postfix/mydestination.regexp

/etc/postfix/mydestination.regexp
    /\.myname\.com$/ whatever

/etc/namedb/s/myname.com:
     IN SOA .....
        IN NS ....
            IN MX ...
    * IN MX 100 primary.myname.com.
    * IN MX 200 backup.myname.com.

If you want to do this with a virtual domain, include the regexp
table in $virtual_maps instead of in $mydestination.

        Wietse