[Exim] exim 4.x + LDAP + courier-imap

Top Page
Delete this message
Reply to this message
Author: Samuel GAUTIER
Date:  
To: exim-users
Subject: [Exim] exim 4.x + LDAP + courier-imap
Hi there,
I have some troubles in configuring Exim to use LDAP lookups for aliases, mail directories etc ....
There are some samples on the web for Exim 3.X but not for 4.X.
I started to use the convert tool to perform the migration from a configuration file in version 3.X to version 4.X. But it doesn't work very well.
Is there anybody using version 4.X who can look at my configuration file or give me any help ????
Have you any configuration sample ???

here is my configuration file :

acl_smtp_rcpt = check_recipient
acl_smtp_data = check_message
acl_smtp_vrfy = check_vrfy

domainlist local_domains = @ : \
    @[] : \
    localhost : \
    samlaptop.societe.fr : \
    societe.fr : \
    webmail.entreprise.com : \
    users.entreprise.com : \
    ftp.entreprise.com


domainlist relay_domains = @mx_any
hostlist relay_hosts = localhost
rfc1413_hosts = !*
rfc1413_query_timeout = 0s
auto_thaw = 1h
split_spool_directory
remote_max_parallel = 5
smtp_accept_max = 40
return_size_limit = 10K
qualify_domain = societe.fr
never_users = root
host_lookup = *
trusted_users = mail
gecos_pattern = ^([^,:]*)
gecos_name = $1
smtp_accept_queue_per_connection = 100
freeze_tell = postmaster
received_header_text = "Received: \
         ${if def:sender_rcvhost {from ${sender_rcvhost}\n\t}\
         {${if def:sender_ident {from ${sender_ident} }}\
         ${if def:sender_helo_name {(helo=${sender_helo_name})\n\t}}}}\
         by ${primary_hostname} \
         ${if def:received_protocol {with ${received_protocol}}} \
         (Exim ${version_number} #${compile_number} (Debian))\n\t\
         id ${message_id}\
         ${if def:received_for {\n\tfor <$received_for>}}"


begin acl

check_recipient:
  # Exim 3 had no checking on -bs messages, so for compatibility
  # we accept if the source is local SMTP (i.e. not over TCP/IP).
  # We do this by testing for an empty sending host field.
  accept  hosts = :
  accept  domains = +local_domains
  accept  domains = +relay_domains
  accept  hosts = +relay_hosts
  deny    message = relay not permitted


check_message:
accept

check_vrfy:
accept

begin routers

lookuphost:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp

literal:
driver = ipliteral
domains = ! +local_domains
transport = remote_smtp
no_more

ldap_user:
driver = redirect
allow_defer
allow_fail
data = ${lookup ldapm {user="cn=manager,dc=societe,dc=fr" pass=ldapadmin ldap:///localhost:389/ou=Users,o=unidirect,dc=societe,dc=fr?maildrop?sub?(&(uid=${local_part}))}}
directory_transport = address_directory_ldap
errors_to = real-admin
file_transport = address_file_ldap
group = vmail
retry_use_local_part
user = vmail

localuser:
driver = accept
check_local_user
transport = local_delivery

begin transports

local_delivery:
driver = appendfile
envelope_to_add
file = /var/spool/mail/${local_part}
group = mail
mode = 0660
no_mode_fail_narrower

address_pipe:
driver = pipe
return_output

address_file:
driver = appendfile

address_directory:
driver = appendfile
check_string =
message_prefix = ""
message_suffix = ""


address_reply:
driver = autoreply

procmail_pipe:
driver = pipe
check_string = "From "
command = "/usr/bin/procmail -d ${local_part}"
delivery_date_add
envelope_to_add
escape_string = ">From "
group = mail
return_path_add
user = $local_part

remote_smtp:
driver = smtp

address_directory_ldap:
driver = appendfile
create_directory
directory_mode = 0770
maildir_format
mode = 0660
quota = 10M

address_file_ldap:
driver = appendfile
use_lockfile

begin retry

*                      quota_1d
*                      *           F,4h,5m; G,16h,1h,1.5; F,4d,8h





Next I would like to use courier-imap because of the good ldap integration for authentication.


--

Samuel GAUTIER