Thread View: news.software.nntp
2 messages
2 total messages
Started by Andre Addicks
Fri, 12 Feb 1999 00:00
LDAP and INN ?
Author: Andre Addicks
Date: Fri, 12 Feb 1999 00:00
Date: Fri, 12 Feb 1999 00:00
11 lines
671 bytes
671 bytes
hello, can somebody tell me if there is a LDAP hook for INN 2.x ? We want to use it for client authentication. grtx Andre Addicks
Re: LDAP and INN ?
Author: Jim Dutton
Date: Mon, 15 Feb 1999 00:00
Date: Mon, 15 Feb 1999 00:00
52 lines
2886 bytes
2886 bytes
In article <7a1coc$q39$1@news.kpn.com>,
A.Addicks@kpn.com (Andre Addicks) writes:
> can somebody tell me if there is a LDAP hook for INN 2.x ? We want to use it
> for client authentication.
There isn't any direct LDAP hook in INN-2.1, and I don't think that there is
any such thing in INN-2.2 either.
One step removed from initial news client connection and authentication is the
ability to accept/reject posted articles based upon user data stored in an LDAP
server. You can use the 'filter_nnrpd.pl' program in conjunction with the
LDAPSEARCH "command line tool" from UMich LDAP-3.3 or Netscape Directory
Server-3.1 (4.x?).
Here is a (partial) sample using locally installed (UMich) LDAP and INN-2.1:
$emailDS = "ldap.server"; $ldapcmd = "/usr/local/bin/ldapsearch";
$logger = "/usr/bin/logger -i -p news.notice";
#
# n504 - LDAP lookup on E-mail address
#
# add code to perform an LDAP lookup of the poster's E-mail address
# while this is not a foolproof security mechanism, it at least should
# help to prevent someone using a non-local E-mail address (most likely to
# happen with a "spammer" posting)
#
# valid mail attributes to search on: "mail", "otherMailbox"
#
$email_address = "$from_userid\\\\\@$from_host";
# $result = `$logger _email_address: '"'$email_address'"'`;
$baseDN = '"-b o=<our domain>,c=US"';
$filter = '"mail='.$email_address.'"';
# $result = `$logger _filter: '"'$filter'"'`;
$userDN = `$ldapcmd $emailDS "$baseDN" "$filter" dn`;
chomp($userDN); ($userRDN) = $userDN =~ /^cn=(\w+\s*\w*\s*\w*\s*\w*),/;
$result = `$logger "_userRDN(mail)": '"'$userRDN'"'`;
if ($userRDN eq "") {
$filter = '"otherMailbox='.$email_address.'"';
$userDN = `$ldapcmd $emailDS "$baseDN" "$filter" dn`;
chomp($userDN); ($userRDN) = $userDN =~ /^cn=(\w+\s*\w*),/;
$result = `$logger "_userRDN(otherMail)": '"'$userRDN'"'`;
if ($userRDN eq "") {
$rval = "n504: Invalid E-mail address";
$result = `$logger "_rval:" '"'$rval'"'`; return ($rval);
}
}
#
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads