From: Henri on
Hello,

I have a question about a warning message I regularly get in the log :
> do not list domain mydomain1 in BOTH virtual_mailbox_domains and
relay_domains

My configuration :
transport_maps = ldap:/etc/postfix/mail_routing
relay_domains = mydomain1
virtual_mailbox_domains = mydomain1

I do understand why I get this warning message but my situation is
particular.

I do a mail routing based on a LDAP attribute which I get with
transport_maps and a ldap lookup table.

Mail for the users with mail adress @mydomain1 could either be delivered in
local or be relayed to another mail server.
That is why I declare "mydomain1" both in virtual_mailbox_domains and
relay_domains

Do you have a better solution in order to not see this warning message
again?

Thanks,

Henri


# dpkg -l | grep postfix
ii postfix 2.3.8-2+b1 A high-
performance mail transport agent
From: Wietse Venema on
Henri:
> Hello,
>
> I have a question about a warning message I regularly get in the log :
> > do not list domain mydomain1 in BOTH virtual_mailbox_domains and
> relay_domains
>
> My configuration :
> transport_maps = ldap:/etc/postfix/mail_routing
> relay_domains = mydomain1
> virtual_mailbox_domains = mydomain1
>
> I do understand why I get this warning message but my situation is
> particular.
>
> I do a mail routing based on a LDAP attribute which I get with
> transport_maps and a ldap lookup table.
>
> Mail for the users with mail adress @mydomain1 could either be delivered in
> local or be relayed to another mail server.
> That is why I declare "mydomain1" both in virtual_mailbox_domains and
> relay_domains
>
> Do you have a better solution in order to not see this warning message
> again?

Don't do this. Postfix MUST know where to look so that it can reject
mail for non-existent recipients.

Instead, list mydomain1 in virtual_mailbox_domains, and list the
valid recipients in either virtual_mailbox_maps (for final delivery),
or virtual_alias_maps (for mailboxes on other servers).

Wietse