OT: Sendmail LDAP Routing - failure

William Burns William.Burns at AEROFLEX.COM
Fri May 14 17:50:58 IST 2004


James Gray wrote:

>Hi All (and Kevin Spicer specifically),
>
>I am trying to implement the LDAP_ROUTE_FILE feature as detailed in
>Kevin's documentation at
>http://www.sng.ecs.soton.ac.uk/mailscanner/serve/cache/270.html
>
>
>
Ok, you should do an LDAP query to make sure that your directory is
responding properly.
Hrm???
Oh. You're not really doing LDAP, are you?

Ok, then use this test script instead:

 > cat >ldapquery <<EOF
 > #!/bin/sh
 > echo /map ldapmra $@ |/usr/sbin/sendmail -bt -C/etc/mail.sendmail.cf
|tail +3
 > echo
 > echo /map ldapmh $@ |/usr/sbin/sendmail -bt -C/etc/mail.sendmail.cf
|tail +3
 > echo
 > EOF
 > chmod a+x ldapquery
 > ./ldapquery username at mydomain.com

(You should change the script to reflect the location of the sendmail.cf
file that you want to test.)
If the "LDAP map" configured in sendmail is working, you should see
something like:
 > ... returns username at yourdomain.com

>I'm not sure where I'm screwing up, but after making all the changes in
>/etc/mail, then restarting sendmail, everything is rejected as "Unknown
>User" - eek.
>
>
Sorry I didn't take the time to review/debug your sendmail.mc.
If you let us know about the results from above, that should narrow
things down a bit.

>Our setup is a little different to most; the mail gateway relays most
>domains back to the exchange server, but accepts 2 domains for local
>delivery.  If I read the FAQ properly, then I need to put every domain
>(both local and relayed) into /etc/mail/local-host-names and only the
>relayed domains in /etc/mail/ldap-domains .... right?
>
>
>
You wouldn't use the LDAP routing feature for mail that is to be
delivered to your local machine, since your local machine already knows
what usernames it's capable of delivering to locally...
I'm not sure about the local-host-names file. I thought that this was
only for locally delivered stuff.

>The /etc/mail/access currently doesn't allow relay from anything except
>the local machine and the IP of the exchange server.  There are also a
>bunch of "spammer.com    550 Go away spammer" directives in there to
>handle big spam problems.
>
>
I'm doing "actual" LDAP routing, so I'm not sure if there's a difference
between your setup and mine here, but...
I use the access file to declare what's delivered locally (w/ an "OK")
and what's relayed. (w/ a "RELAY" value)

>The /etc/mail/mailertable has (had) all the relayed domains as
>"relayed1.com    SMTP:[172.20.x.y]" etc, and the local domains as
>"local1.com      local:"
>I've commented out all the "relayed1.com" lines and left the
>"local1.com" lines.
>
>
>
Hmm. I never bothered to list locally delivered stuff in mailertable.
The lines for the relayed domains look ok to me.

-Bill

-------------------------- MailScanner list ----------------------
To leave, send    leave mailscanner    to jiscmail at jiscmail.ac.uk
Before posting, please see the Most Asked Questions at
http://www.mailscanner.biz/maq/     and the archives at
http://www.jiscmail.ac.uk/lists/mailscanner.html



More information about the MailScanner mailing list