Current oav website

This commit is contained in:
Charlie Root
2023-03-20 12:18:38 +01:00
commit a096ce07cf
3270 changed files with 261778 additions and 0 deletions

121
tmp/openldap/mailboxes.pm Normal file
View File

@ -0,0 +1,121 @@
# $Id: mailboxes.pm,v 1.1 2007/02/19 22:33:18 kiwi Exp $
#
package mailboxes;
use Mail::RFC822::Address qw(valid);
use POSIX;
use strict;
sub new
{
my $class = shift;
my $this = {};
bless $this, $class;
print STDERR "Starting mailboxes\n";
return $this;
}
sub init
{
return 0;
}
sub search
{
my $this = shift;
my @match_entries = ();
my $todo;
my($row, $mailaddr, $quotedmail, $res, $sth, $path, $searchmail);
my($base, $scope, $deref, $sizeLim, $timeLim, $filter, $attrOnly, @attrs ) = @_;
# Checking about what looking for
# mail= foo -> postfix / pll VDA delivery
# uid= foo -> pop3/imap that supports @ -> %
$todo = $filter;
$todo =~ s/^\((.*)=.*\)$/\1/g;
#print STDERR "==> Want : $todo \n";
$mailaddr = $filter;
if ($todo =~ "uid") {
# replacing % -> @
print STDERR "We get a request for UID\n";
$mailaddr =~ s/\%/\@/g;
}
print STDERR "Looking for : $mailaddr \n";
if (not ($mailaddr =~ s/^\(uid=(.*)\)$/\1/g)) {
if(not ($mailaddr =~ s/^\(mail=(.*)\)$/\1/g)) {
return(0, ()); # Filtre non authorise.
}
}
if (not valid("<".$mailaddr.">")) {
return(0, ()); # Mail non valide RFC822
}
# We get data, then format output... :)
print STDERR "We get some results...\n";
my $entry =
"dn : uid=$mailaddr,ou=mailboxes,dc=kazar,dc=net\n\t".
"objectClass : top\n\t".
"objectClass : kazarPerson\n\t";
$entry .= "uid : $mailaddr\n\t";
$entry .= "cn : Nom Prenom\n\t";
$entry .= "description : Sample description\n\t";
$entry .= "uidNumber : 10\n\t";
$entry .= "gidNumber : 10\n\t";
$entry .= "userPassword : Password\n\t";
$entry .= "homeDirectory : /home/test\n\t";
$entry .= "mailQuota : 50\n\t";
$entry .= "CouriermailQuota : 50S\n\t";
print STDERR "Sending -> $entry\n";
push @match_entries, $entry;
return(0, @match_entries);
}
sub compare
{
return 0;
}
sub modify
{
return 0;
}
sub add
{
return 0;
}
sub modrdn
{
return 0;
}
sub delete
{
return 0;
}
sub config
{
return 0;
}
sub bind
{
return 0;
}
1;

31
tmp/openldap/slapd.conf Normal file
View File

@ -0,0 +1,31 @@
## $Id: slapd.conf,v 1.1 2007/02/19 22:33:19 kiwi Exp $
##
## Global configuration options
##
# Dynamic backends
modulepath /usr/local/libexec/openldap
moduleload back_perl
include /usr/local/etc/openldap/schema/core.schema
include /usr/local/etc/openldap/schema/cosine.schema
include /usr/local/etc/openldap/schema/inetorgperson.schema
include /usr/local/etc/openldap/schema/kazar.schema
#include /usr/local/etc/openldap/schema/pureftpd.schema
#include /usr/local/openldap/etc/openldap/schema/perdition.schema
pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args
allow bind_v2
reverse-lookup off
##
## Mysql - LDAP perl modules
##
database perl
perlModulePath /usr/local/etc/openldap
suffix "ou=mailboxes,dc=kazar,dc=net"
perlModule mailboxes