RE: [Exim] Migrating from qmail-LDAP to exim

Top Page
Delete this message
Reply to this message
Author: 薛忠胜
Date:  
To: exim-users
Subject: RE: [Exim] Migrating from qmail-LDAP to exim
Nathan,

I've done some test of migration from qmail-ldap to exim v4.20, but not growth into production stage.
Hope this will help you.

Thanks much people on this maillist, because they give me so much help.

As my configuration ,there 3 files: me, ldapsettings and exim.conf.

cat me:
_____________________________________________________________________________
ME = mail40.taiping.com

cat ldapsetting:
_____________________________________________________________________________
LDAPSERVER = 10.1.1.109::389
BASEDN = dc=taiping,dc=com

cat exim.conf
_____________________________________________________________________________
#include host specific information, espeically this hostname.
#according to qmail-ldap, I named this file `me`.
.include /etc/exim/me
.include /etc/exim/ldapsetting

primary_hostname = ME

domainlist local_domains  = taiping.com : tplic.com

#our intranet is 10.0.0.0/255.255.255.0
hostlist   internal_hosts = 10.0.0.0/24

never_users = root

ldap_default_servers = LDAPSERVER

acl_smtp_rcpt = acl_check_rcpt

#LDAP lookup URL
#More about this URL, pls refer to Exim doc.

LOOKUP_URL = ldap:///ou=taiping.com,BASEDN??sub?(|(mail=$local_part@$domain)(mailAlternateAddress=$local_part@$domain))

#Store all information retrieved from ldap into a macro
USER_DATA  = ${lookup ldap{LOOKUP_URL}}

begin routers
#forward all mail sent to root@localhost to mail@localhost
root_user:
    driver = redirect
    domains = ME
    local_parts = root
    check_local_user
    data = mail

localuser:
    driver = accept
    domains = ME
    check_local_user
    transport = local_delivery

#according ldap lookup, if user's mailhost is this, accept it
in_this_host:
    driver = accept
    transport = save_this_host_maildir
    condition  = ${if eq {ME} {${extract {mailHost} {USER_DATA}}} {yes}{no}}

#if user's mailhost not this host, but in the same domain
not_in_this_host_but_in_this_domain:
    driver = manualroute
    domains = +local_domains
#extract target host from macro USER_DATA defined previously
    route_data =  ${extract {mailHost} {USER_DATA}}
    transport = redirect_to_real_server

#not this host and not in this domain
not_in_this_host_and_not_in_this_domain:
    driver = manualroute
    domains = !+local_domains
    transport = redirect_to_mailhub
#mail.tplic.com is a gateway which forward all mail sent to external
    route_data = mail.tplic.com

begin transports

save_this_host_maildir:
    driver = appendfile
    create_directory = true
    mode = 0700
    maildir_format = true
#extract user's maildir from USER_DATA
    directory = /tpdata/vusers/${extract {mailMessageStore}{USER_DATA}}/Maildir

redirect_to_real_server:
    driver = smtp

redirect_to_mailhub:
    driver = smtp

local_delivery:
  driver = appendfile
  file = /var/mail/$local_part
  delivery_date_add
  envelope_to_add
  return_path_add


begin acl

acl_check_rcpt:
  #accept  hosts   = +internal_hosts
  deny    domains = !+local_domains
          message =
          #message = $local_domains
  accept  authenticated = *




----- Original Message -----
From: "Nathan Ollerenshaw" <chrome@???>
To: <exim-users@???>
Sent: Thursday, August 07, 2003 5:24 PM
Subject: [Exim] Migrating from qmail-LDAP to exim


Hi folks!

Has anyone here done a migration from qmail-LDAP to exim?

As far as I can tell, it should be easy to have both MTAs use the same
LDAP schema. I'm hoping that someone has already written an Exim4
config file that uses the qmail-ldap schema.

Regards,

Nathan.

--
Nathan Ollerenshaw - Systems Engineer - Shared Hosting
ValueCommerce Japan - http://www.valuecommerce.ne.jp

"You have just destroyed one model XQJ-37 nuclear powered
pansexual roto-plooker....and you're gonna have to pay for it."
  - Frank Zappa


--

## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##