> I want to register all user accouts on the LDAP server which the
> relay mail server(mail hub) will look up for email routing to our three mail
> servers.
> **That is, the mail hub will refer to LDAP to know to which
> mail host(mail server) it should relay the mail for a particular user** WHICH
> AT THE SAME TIME PROVIDES A SECURITY FUNCTION AS MAIL SENT TO OR FROM A USER
> NOT REGISTERED ON THE LDAP SERVER WILL NOT BE RELAYED THE MAIL BY THE
> MAIL HUB** (Below is a basic diagram)
(no need to shout :-)
Sounds like an LDAP-based virtusertable lookup will do nicely.
The Stanford doc appears to refer to the choice of schema and not
the implementation.
Here is an example for sendmail.cf (I cannot help with building it
though). This does a lookup on "mail" attribute for the supplied email
address, and uses maildrop as the address to deliver to (i.e.
account@real.server)
Kvirtuser ldapx -b"ou=XXX,o=XXX,c=XX" -h"ldap.domain.com" -k"(mail=%s)" -v maildrop
Similarly for Postfix:
virtual_maps = ldap:lookup
lookup_server_host = ldap.domain.com
lookup_search_base = ou=XXX,o=XXX,c=XX
lookup_query_filter = (mail=%s)
lookup_result_attribute = maildrop
lookup_bind = no
lookup_timeout = 60
If you have trouble building Sendmail with LDAP support then
try Postfix and follow LDAP_README instructions.
I would imagine that for this scenario, where all mail will be
diverted to another server, mail500 will result in more load on
the mail server than virtusertable would.