OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: Local recipient table in LDAP problem

From: Aleksandar Vukovic (vualekscg.ac.yu)
Date: Fri Jan 25 2008 - 04:32:18 CST


----- Original Message -----
From: "Victor Duchovni" <Victor.DuchovniMorganStanley.com>
To: <postfix-userspostfix.org>
Sent: Thursday, January 24, 2008 3:12 PM
Subject: Re: Local recipient table in LDAP problem

> On Thu, Jan 24, 2008 at 01:09:10PM +0100, Aleksandar Vukovic wrote:
>
>> Hi all,
>>
>> I'm trying to make a postfix & ldap database combination so that all
>> mailboxes are owned by one system user and postfix smtpd daemon should
>> lookup from LDAP for local recipient table and location of mailboxes
>> upon receiving mail. Delivering is done by dovecot and it worked ok
>> while acctual users were in /etc/passwd, but when I removed them
>> form /etc/passwd and expected lookup from ldap i got 'unknown user:
>> "username"' error. Is this kind of setup possible at all because mailbox
>> locations also need to be read from LDAP (I'm not sure :)? There are no
>> virtual domains here, everything is for localdomain, but maybe this is
>
> http://www.postfix.org/VIRTUAL_README.html
>
>> I replaced private things with bogus, but its clean enough.
>>
>> This is my postconf -n:
>>
>> alias_database = hash:/etc/aliases
>> alias_maps = hash:/etc/aliases, ldap:/etc/postfix/ldap.cf
>> append_dot_mydomain = no
>> biff = no
>> body_checks_size_limit = 10485760
>> broken_sasl_auth_clients = yes
>> config_directory = /etc/postfix
>> home_mailbox = .maildir/
>> html_directory = /usr/share/doc/postfix/html
>> inet_interfaces = all
>> local_recipient_maps = $alias_maps
>> mailbox_command = /usr/lib/dovecot/deliver
>> mydestination = mail.mydomain.com, localhost.mydomain.com, localhost ,
>> mydomain.com
>
> Clearly you are still trying to do local delivery for system users.
>
> --
> Viktor.
>
> Disclaimer: off-list followups get on-list replies or get ignored.
> Please do not ignore the "Reply-To" header.
>
> To unsubscribe from the postfix-users list, visit
> http://www.postfix.org/lists.html or click the link below:
> <mailto:majordomopostfix.org?body=unsubscribe%20postfix-users>
>
> If my response solves your problem, the best way to thank me is to not
> send an "it worked, thanks" follow-up. If you must respond, please put
> "It worked, thanks" in the "Subject" so I can delete these quickly.

So what do you suggest me to do? I tried with result_attribute = uid
earlier and it gave same results (unknown user). I am confused by thing
that postmap -q usermydomain.com ldap:/etc/postfix/ldap.cf returns
correct data (either only username or full email address depending how
i set result_attribute). Does mailbox command (deliver) get mailbox
location from postfix when delivering mail or it looks for it on its own
(because it's dovecot and it looks into ldap)?

Thanks for your help Victor and Reinaldo.

Aleksandar