OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
nested aliases expansion problem with virtual domains

From: Andrew Koros (akoroske.uu.net)
Date: Wed Dec 05 2007 - 23:22:34 CST


Hello,

Is there anyone out there with any idea about my problem described below?

I have postfix-2.4.6 built with PostgreSQL lookup support on Linux (CentOS-5
and Fedora).

I have an interesting problem with nested aliases in virtual domains. Here is
the scenario:

In my main.cf I have :

 virtual_mailbox_domains =
proxy:pgsql:/etc/postfix/pgsql-my-virtual-destinations.cf
 virtual_mailbox_base = /var/mail
 virtual_mailbox_maps = proxy:pgsql:/etc/postfix/pgsql-virtual.cf
 virtual_alias_maps = proxy:pgsql:/etc/postfix/pgsql-aliases.cf
 virtual_alias_domains=
 transport_maps =
hash:/etc/postfix/transport, proxy:pgsql:/etc/postfix/pgsql-transport.cf
 e.t.c

In my virtual_mailbox_domains database I have the entries that returns results
like:
 example.com
 somewhere-else.com
e.t.c.

I have some entries in the virtual_mailbox_maps database that returns the
following results
 mailbox1example.com
 mailbox2example.com
 mailbox1somewhere-else.com
e.t.c

I have some entries in the virtual_alias_maps database like the following:

 alias1example.com mailbox1example.com
 alias2example.com mailbox2example.com
 alias2example.com mailbox1somewhere-else.com
 alias3example.com alias2example.com
 alias3example.com mailboxsome-remote-site.com
e.t.c

The problem:

Mails to alias1example.com and alias2example.com work fine.

But mail to the nested alias alias3example.com

Results in Errors. The following are the errors as tested using sendmail -bv

<alias2example.com> (expanded from <alias3example.com>): delivery via virtual:
    unknown user: "alias2example.com"

<mailbox2example.com> (expanded from <alias3example.com>): delivery via
    pop.example.com[x.x.x.x]:25: 250 Accepted

<mailbox1somewhere-else.com> (expanded from <alias3example.com>): delivery via
    pop.example.com[x.x.x.x]:25: 250 Accepted

<mailboxsome-remote-site.com> (expanded from <alias3example.com>): delivery via
    mx.some-remote-site.com[y.y.y.y]:25: 250 Accepted

It looks like it expands the result of the nested alias3example.com i.e.
alias2example.com but still attempts to lookup the alias2example.com as though
it is a mailbox.

Anyone has any idea how to solve this problem?

Andrew Koros
Systems Developer

UUNET KENYA LTD

The Only ISP with an MPLS enabled Network

2nd Floor Parkside Towers
Mombasa Road, Nairobi

Email: akoros <at> ke.uu.net

http://www.uunet.co.ke

NOTICE: "The contents of this e-mail and any accompanying documentation is
confidential and any use thereof, in whatever form, by anyone other than the
addressee for whom it is intended, is strictly prohibited."

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| / / (_)__ __ ____ __ |
| / /__/ / _ \/ // /\ \/ / | Freedom to
| /____/_/_//_/\_,_/ /_/\_\ | Experiment
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~