On Thu, Jan 28, 2021 at 12:45:30AM +0100, Michael Agbaglo wrote:

> While the test using postmap was successful, the test with sendmail
> fails. The debug show that for some reason '%s' is holding just the
> domain. Why is that?

    $ postconf -d virtual_mailbox_domains
    virtual_mailbox_domains = $virtual_mailbox_maps

Set "virtual_mailbox_domains" explicitly if you want to specify these
in some other way.

> # postconf -n | grep virtual-mailbox
> virtual_mailbox_maps = ldap:/etc/postfix/ldap/virtual-mailbox-maps.cf

Best practice is generally "proxy:ldap:" rather than "ldap:".

> postmap -q [email protected]
> ldap:/etc/postfix/ldap/virtual-mailbox-maps.cf; echo $?
> [email protected]

The result of "virtual_mailbox_maps" is typically a mailbox path, if
virtual delivery is to be via the Postfix built-in virtual(8) delivery
agent.  If you're using LMTP or dovecot-lda, ... then the RHS is of
course irrelevant, and returning the original address as-is is fine.

-- 
    Viktor.

Reply via email to