Re: [exim] exim + openldap + hubbed domain + virtual domain

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Pat Hastings
Dátum:  
Címzett: 'Jason Michaelson', exim-users
Tárgy: Re: [exim] exim + openldap + hubbed domain + virtual domain
We have just done a very similar thing.

We used the authlib.schema from courier as our base schema slightly
modifying it to add fields such as forward to hold the user's forwarding
information.

Some good examples are:

http://www.bastard.net/~kos/mailrouter/
http://wanderingbarque.com/howtos/mailserver/mailserver.html

Both offer different ways of doing it but should give you a good idea
for designing your schema.

For us we created an organization called email and underneath that we
created an organization for each domain.

Eg:     o=domain1.example,o=email,dc=myhosting,dc=example
     o=domain2.example,o=email,dc=myhosting,dc=example


we the abused the postal code field of organization to hold the ip
address of the server email should be forwarded on to. To make sure that
only email for valid users was passed on we then set up a
courierMailAccount entry for each user in the ldap.

Eg:
mail=me@???,o=domain1.example,o=email,dc=myhosting,dc=exampl
e
mail=you@???,o=domain1.example,o=email,dc=myhosting,dc=examp
le

and finally used a manualroute redirector from exim to direct the mail
to the right place:

hubbed_hosts:
  debug_print = "R: hubbed_hosts for $domain"
  driver = manualroute
  route_data = ${lookup\
ldap{ldap://LDAPSERVER/o=$domain,LDAPBASE?postalcode}}
  transport = remote_smtp
  condition = ${lookup\
ldap{ldap://LDAPSERVER/o=$domain,LDAPBASE?mail?sub?\
    (mail=$local_part@$domain)} {yes} {no}}
  no_more



nb LDAPSSERVER = ipaddress
LDAPBASE = o=email,dc=myhosting,dc=example

Probably better solutions out there but the above should be a start for
you.

Pat

-----Original Message-----
From: exim-users-bounces@??? [mailto:exim-users-bounces@exim.org]
On Behalf Of Jason Michaelson
Sent: 25 May 2006 21:42
To: exim-users@???
Subject: [exim] exim + openldap + hubbed domain + virtual domain

Right now, I've got exim set up as a mail hub for one domain. it accepts

mail externally and relays it internally. I'm looking to add mail
forwarding
through an LDAP lookup for a second domain that I have for other users.
Basically I want my exim setup to send all mail for domain a.org to the
server pointed to by my internal mx records, while looking up email
destined
for people at the b.com domain in the ldap database and redirecting the
mail
to them. My users of b.com email addresses will have a php front end to
manage their user name, real email address, and password in the ldap
database.

Has anyone out there ever done this sort of thing? I'm looking for
recommendations on which ldap schema(s) to use and how to configure the
exim
drivers to use them.

thanks

jdm


--
## List details at http://www.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/
---
[This E-mail has been scanned for viruses but it is your responsibility
to maintain up to date anti virus software on the device that you are
currently using to read this email. ]


---
[This E-mail has been scanned for viruses but it is your responsibility
to maintain up to date anti virus software on the device that you are
currently using to read this email. ]