[Exim] Re: OpenLDAP with Exim

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Steve Haslam
Fecha:  
A: Erry Rahmawan
Cc: exim-users
Asunto: [Exim] Re: OpenLDAP with Exim
On Wed, Nov 10, 1999 at 01:27:07PM +0700, Erry Rahmawan wrote:
> I have a problem with my exim 3.02
> I wanna use OpenLDAP 1.2.7 for user database, now I habe a trouble with my
> exim that exim doesn't wanna look ldap_delivery for remote smtp.
> but i have succesfully to send e-mail to local system
>
> Is there any suggestion ?
> I give you copy some of my /usr/exim/configure
>
> .....
>
> ldap_delivery:
> driver = appendfile
> prefix = ""
> suffix = ""
> no_from_hack
> create_directory
> directory = /var/mail/${domain}/${local_part}
> user = nobody
> group = nobody
>
>
> ldap_search_user:
> driver = aliasfile
> search_type = ldap
> expand
> queries =
> "ldap:://192.168.10.10/?maildrop?sub?(&(mail=$local_part@$domain))"
> #\i
> transport = ldap_delivery


OK, so you have LDAP entries with attributes "mail" and "maildrop"- if
something comes in matching someones "mail" attribute, it uses the
"maildrop" attribute and the domain to put it into /var/mail. Right?

Um, acutally, you're using the local_part to generate the maildrop
name, so mail to "foo@???" will go to "/var/mail/bar.com/foo/..."

Have you configured all domains to be recognised in this way as local
domains?

I created this transport:

# Test
ldap_delivery:
driver = appendfile
prefix = ""
suffix = ""
no_from_hack
create_directory
directory = /var/spool/mail/${domain}/${local_part}
maildir_format
user = nobody
group = mail
directory_mode = 0770
mode = 0660

And this director:

# Interrogate LDAP
ldap:
driver = aliasfile
search_type = ldap
query = ldap://arise/ou=people,dc=arise,dc=demon,dc=co,dc=uk?mail?sub?(uid=${local_part})
transport = ldap_delivery

I tried delivering to "jo@???" and it created a Maildir
called "/var/spool/mail/monolith.sinshack/jo/", with the right (I
think) modes etc. for a Debian system (group=mail, group-writable),
with files owned by "nobody" (is this a good idea? Owned by root?).

AFAICT, the return value of the LDAP query is junked, since the
director specifies the transport to use. Without the transport
setting, I use this director to generate forwarding addresses.

HTH

(I'm forwarding this to exim-users since you asked the question there
too, and this might be useful to other people as well).

SRH
-- 
Steve Haslam      http://www.arise.demon.co.uk/      steve@???
Debian GNU/Linux Maintainer                               araqnid@???
almost called it today, turned to face the void, numb with the suffering
and the question- "Why am I?"                                  [queensrÿche]