[Evolvis-commits] r279: My part of the work on LDAP email forwarding. Not functional yet, but↵ the tools are there . ↵

mirabilos at evolvis.org mirabilos at evolvis.org
Thu Feb 25 14:13:58 CET 2010


Author: mirabilos
Date: 2010-02-25 13:13:57 +0000 (Thu, 25 Feb 2010)
New Revision: 279

Modified:
   trunk/gforge_base/evolvisforge/
   trunk/gforge_base/evolvisforge/gforge/deb-specific/exim.directors.template
   trunk/gforge_base/evolvisforge/gforge/deb-specific/sourceforge.schema
   trunk/gforge_base/evolvisforge/gforge/debian/changelog
   trunk/gforge_base/evolvisforge/gforge/debian/sourceforge.postinst
   trunk/gforge_base/evolvisforge/gforge/utils/sql2ldif.pl
Log:
My part of the work on LDAP email forwarding.  Not functional yet, but
the tools are there.



Property changes on: trunk/gforge_base/evolvisforge
___________________________________________________________________
Name: bzr:revision-info
   - timestamp: 2001-09-05 06:35:56.000000000 +0000
committer: lo-lan-do

   + timestamp: 2001-09-05 06:40:01.000000000 +0000
committer: lo-lan-do

Name: bzr:file-ids
   - gforge/deb-specific/fill-in-the-blanks.pl	7 at 9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk%2Fgforge%2Fdeb-specific%2Ffill-in-the-blanks.pl

   + gforge/deb-specific/exim.directors.template	27 at 9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk%2Fgforge%2Fdeb-specific%2Fexim.directors.template
gforge/deb-specific/sourceforge.schema	7 at 9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk%2Fgforge%2Fdeb-specific%2Fsourceforge.schema
gforge/debian/changelog	7 at 9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk%2Fgforge%2Fdebian%2Fchangelog
gforge/debian/sourceforge.postinst	7 at 9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk%2Fgforge%2Fdebian%2Fsourceforge.postinst
gforge/utils/sql2ldif.pl	2 at 9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk%2Fgforge%2Futils%2Fsql2ldif.pl

Name: bzr:revision-id:v4
   - 1 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:1
2 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:2
3 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:7
4 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:9
5 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:10
6 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:11
7 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:12
8 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:13
9 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:14
10 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:15
11 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:16
12 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:17
13 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:18
14 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:19
15 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:20
16 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:21
17 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:22
18 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:23
19 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:24
20 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:25
21 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:26
22 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:27
23 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:28
24 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:29
25 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:30
26 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:31
27 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:32
28 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:33
29 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:34
30 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:35
31 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:36
32 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:37
33 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:38
34 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:39
35 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:40
36 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:41
37 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:42
38 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:43
39 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:44
40 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:45
41 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:46
42 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:47
43 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:48
44 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:49

   + 1 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:1
2 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:2
3 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:7
4 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:9
5 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:10
6 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:11
7 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:12
8 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:13
9 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:14
10 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:15
11 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:16
12 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:17
13 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:18
14 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:19
15 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:20
16 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:21
17 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:22
18 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:23
19 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:24
20 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:25
21 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:26
22 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:27
23 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:28
24 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:29
25 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:30
26 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:31
27 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:32
28 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:33
29 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:34
30 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:35
31 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:36
32 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:37
33 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:38
34 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:39
35 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:40
36 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:41
37 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:42
38 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:43
39 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:44
40 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:45
41 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:46
42 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:47
43 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:48
44 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:49
45 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:50

Name: bzr:text-parents
   - gforge/deb-specific/fill-in-the-blanks.pl	svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:7

   + gforge/deb-specific/exim.directors.template	svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:41
gforge/deb-specific/sourceforge.schema	svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:7
gforge/debian/changelog	svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:48
gforge/debian/sourceforge.postinst	svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:47
gforge/utils/sql2ldif.pl	svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:48


Modified: trunk/gforge_base/evolvisforge/gforge/deb-specific/exim.directors.template
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/deb-specific/exim.directors.template	2010-02-25 13:13:54 UTC (rev 278)
+++ trunk/gforge_base/evolvisforge/gforge/deb-specific/exim.directors.template	2010-02-25 13:13:57 UTC (rev 279)
@@ -1,4 +1,5 @@
-local_domains = localhost:users.{domain_name}:lists.{domain_name}
+SOURCEFORGE_DOMAINS = users.{domain_name}:{lists_host}
+local_domains = localhost:SOURCEFORGE_DOMAINS
 hide pgsql_servers = "localhost/sourceforge/some_user/some_password"
 
 #Mail director
@@ -8,10 +9,10 @@
   domains = users.{domain_name}
   driver = aliasfile
   file_transport = address_file
-  query = "select email from users where user_name = '$local_part'"
-  search_type = pgsql
-  user = nobody # trust no one
-  group = nogroup # trust no one
+  query = "ldap:///uid=$local_part,ou=People,{ldap_base_dn}?x-forward-email"
+  search_type = ldap
+  user = nobody
+  group = nogroup
 
 
 #ML directors

Modified: trunk/gforge_base/evolvisforge/gforge/deb-specific/sourceforge.schema
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/deb-specific/sourceforge.schema	2010-02-25 13:13:54 UTC (rev 278)
+++ trunk/gforge_base/evolvisforge/gforge/deb-specific/sourceforge.schema	2010-02-25 13:13:57 UTC (rev 279)
@@ -13,7 +13,11 @@
 	EQUALITY caseExactIA5Match 
 	SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) 
 
+attributetype ( 1.1.2.2.3 NAME 'x-forward-email' 
+	DESC 'The address to which email is forwarded' 
+	EQUALITY caseIgnoreIA5Match 
+	SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) 
+
 objectclass ( 1.1.2.2.1 NAME 'x-sourceforgeAccount' SUP top AUXILIARY
 	DESC 'Abstraction of a Sourceforge account' 
-	MAY ( x-cvsShell ) ) 
-
+	MAY ( x-cvsShell $ x-forward-email ) )

Modified: trunk/gforge_base/evolvisforge/gforge/debian/changelog
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/debian/changelog	2010-02-25 13:13:54 UTC (rev 278)
+++ trunk/gforge_base/evolvisforge/gforge/debian/changelog	2010-02-25 13:13:57 UTC (rev 279)
@@ -1,12 +1,5 @@
 sourceforge (2.5-10+9) unstable; urgency=low
 
-  * Added SF_robot and Replicator entry in sql2ldif script
-  * Made ldap_add_password template var work 
-
- -- Christian Bayle <bayle at aist.enst.fr>  Wed,  5 Sep 2001 00:53:29 +0200
-
-sourceforge (2.5-10+8) unstable; urgency=low
-
   * Fixed /etc/aliases entry for sourceforge user.  Really, this time.
   * Fixed Trove software map (closes: #108297).
   * Added sf-add-skill and sf-register-theme scripts.
@@ -19,8 +12,16 @@
   * Fixed User.class (closes: #108682).
   * Added the alias for the Mailman images in sf-httpd.conf.template.
   * Fixed the most important entry in the zone file (ours).
+  * Started hacking on LDAP email forwarding.  I fear this will require
+    that we depend on exim (instead of any other MTA), unless we want to
+    maintain stuff for several MTAs.
+  * Fixed fill-in-the-blanks.pl to allow multiple replacements of the same
+    token on the same line.  That was needed by some magic that's not here
+    anymore, but it's better nevertheless.
+  * [Christian] Added SF_robot and Replicator entry in sql2ldif script.
+  * [Christian] Made ldap_add_password template var work.
 
- -- Roland Mas <lolando at debian.org>  Tue,  4 Sep 2001 20:07:27 +0200
+ -- Roland Mas <lolando at debian.org>  Wed,  5 Sep 2001 09:37:41 +0200
 
 sourceforge (2.5-10) unstable; urgency=low
 

Modified: trunk/gforge_base/evolvisforge/gforge/debian/sourceforge.postinst
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/debian/sourceforge.postinst	2010-02-25 13:13:54 UTC (rev 278)
+++ trunk/gforge_base/evolvisforge/gforge/debian/sourceforge.postinst	2010-02-25 13:13:57 UTC (rev 279)
@@ -32,7 +32,7 @@
 	pattern=$(basename $0).XXXXXX
 	
 	# "Fill in the blanks" in config files
-        files="local.inc database.inc sf-httpd.conf sf-httpd.secrets local.pl"
+        files="local.inc database.inc sf-httpd.conf sf-httpd.secrets local.pl exim.directors"
         vars="domain_name ip_address server_admin db_password system_name admin_login admin_password cvs_host lists_host newsadmin_groupid ldap_host ldap_base_dn ldap_web_add_password skill_list"
         
 	# Invoke our magic script
@@ -46,6 +46,7 @@
 	chmod 640 /etc/sourceforge/database.inc
 	chown sourceforge:sourceforge /etc/sourceforge/local.pl
 	chmod 640 /etc/sourceforge/local.pl
+	chmod 644 /etc/sourceforge/exim.directors
     	
 	# Create the appropriate database user
 	tmp1=$(mktemp /tmp/$pattern)

Modified: trunk/gforge_base/evolvisforge/gforge/utils/sql2ldif.pl
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/utils/sql2ldif.pl	2010-02-25 13:13:54 UTC (rev 278)
+++ trunk/gforge_base/evolvisforge/gforge/utils/sql2ldif.pl	2010-02-25 13:13:57 UTC (rev 279)
@@ -28,11 +28,11 @@
 
 # We give user maximum of privileges assigned to one by groups ;-(
 my $query = "
-SELECT user_name,realname,shell,unix_pw,unix_uid,MAX(cvs_flags)
+SELECT user_name,realname,shell,unix_pw,unix_uid,MAX(cvs_flags),email
 FROM users,user_group
 WHERE unix_status='A'
       AND users.user_id=user_group.user_id
-GROUP BY user_name,realname,shell,unix_pw,unix_uid
+GROUP BY user_name,realname,shell,unix_pw,unix_uid,email
 ";
 my $rel = $dbh->prepare($query);
 $rel->execute();
@@ -42,7 +42,7 @@
 
 @cvs_flags2shell=('/dev/null','/bin/cvssh','/bin/bash');
 
-while(my ($username, $realname, $shell, $pw, $uid, $cvs_flags) = $rel->fetchrow()) {
+while(my ($username, $realname, $shell, $pw, $uid, $cvs_flags, $email) = $rel->fetchrow()) {
 	print "dn: uid=$username,ou=People,$sys_ldap_base_dn\n";
 	#CB# To have the same id than generated by new_parse
 	$uid += $uid_add;
@@ -68,6 +68,7 @@
 gidNumber: $gid
 homeDirectory: $chroot/home/users/$username
 gecos: $realname
+x-forward-email: $email
 
 ";
 	#CB# To have the same id than generated by new_parse




More information about the evolvis-commits mailing list