Re: Appending @domain to a virtual mailbox lookup

From: Magnus Bäck (no email)
Date: Thu Sep 01 2005 - 12:26:07 EDT

  • Next message: Magnus Bäck: "Re: sender address verification"

    On Thursday, September 01, 2005 at 17:20 CEST,
         Etienne Goyer <> wrote:

    > I am installing Postfix and Cyrus imapd to serve virtual mail domain.
    > I am using OpenLDAP as an authentication source and lookup table for
    > Postfix.
    >
    > For Cyrus imapd virtual domain support, I need to deliver via LMTP to
    > mailbox at domain dot I have configured Postfix to lookup the destination
    > mailbox as such :
    >
    > main.cf:
    > virtual_transport = lmtp:unix:/var/lib/imap/socket/lmtp
    > virtual_mailbox_domains = example.com, test.com
    > virtual_mailbox_maps = ldap:/etc/postfix/ldap-virtual-mailbox.cf
    > virtual_alias_maps = ldap:/etc/postfix/ldap-virtual-mailbox.cf
    >
    > ldap-virtual-mailbox.cf:
    > search_base = o=Something
    > query_filter = mail=%s
    > result_attribute = uid
    >
    > The uid attribute in LDAP in unqualified, ie it's "egoyer", not
    > "". For correct delivery via LMTP, I would need to
    > have the domain the mail was originally destined to appended to the
    > uid. As it is, I can see that the LMTP transport try to deliver mail
    > to uid at myhostname, but I would like it to deliver to uid at domain dot

    Unqualified addresses are qualified with myorigin, which in your
    case apparently happens to be equal to myhostname. You can use the
    result_filter parameter (see ldap_table(5)) to modify the returned
    string (uid in this case),

       result_filter = %s at example dot com

    but the string needs to be fixed at example.com or whatever domain,
    i.e. you cannot say "append the same domain as the lookup key".

    > Exemple : mail received for , LDAP search return
    > "egoyer" (the uid attribute), mail delivered to via LMTP.
    >
    > Is this possible ?

    Nope.

    > Would there be a better way of achieving the same result ?

    Storing each user's canonical email address together with the rest of
    the user's data seems like the natural solution, or making sure that the
    canonical address can easily be derived from the data that is stored..

    -- 
    Magnus Bäck
    

  • Next message: Magnus Bäck: "Re: sender address verification"





    Hosted Email Solutions

    Invaluement Anti-Spam DNSBLs



    Powered By FreeBSD   Powered By FreeBSD