IMAP folder separator option
authorJamie Cameron <jcameron@webmin.com>
Fri, 28 Nov 2008 16:43:56 +0000 (16:43 +0000)
committerJamie Cameron <jcameron@webmin.com>
Fri, 28 Nov 2008 16:43:56 +0000 (16:43 +0000)
17 files changed:
ldap-useradmin/CHANGELOG
ldap-useradmin/config
ldap-useradmin/config-*-linux
ldap-useradmin/config-coherent-linux
ldap-useradmin/config-debian-linux
ldap-useradmin/config-debian-linux-3.1
ldap-useradmin/config-debian-linux-4.0-*
ldap-useradmin/config-debian-squirrelmail-linux
ldap-useradmin/config-macos
ldap-useradmin/config-mandrake-linux
ldap-useradmin/config-redhat-linux
ldap-useradmin/config-sol-linux
ldap-useradmin/config-suse-linux
ldap-useradmin/config-trustix-linux
ldap-useradmin/config-united-linux
ldap-useradmin/config.info
ldap-useradmin/ldap-useradmin-lib.pl

index d23a10a..2e435b4 100644 (file)
@@ -61,3 +61,5 @@ Added support for LDAP SSHA passwords, thanks to Bill Moyers and John Gray.
 ---- Changes since 1.430 ----
 The order of the first name and surname in the real name can be changed by a new Module Config setting.
 Coverted all pages to use the new Webmin UI library, for a more consistent look. Also updated the groups chooser to use a left-right selector.
+---- Changes since 1.440 ----
+Added a Module Config option to allow / as an IMAP folder separator, thanks to Bas van den Heuvel.
index 1c1412c..3924048 100644 (file)
@@ -18,3 +18,4 @@ alias_same=0
 given_class=inetOrgPerson
 person=1
 given_order=0
+imap_foldersep=.
index 6ba25cf..0a80331 100644 (file)
@@ -18,3 +18,4 @@ alias_same=0
 given_class=inetOrgPerson
 person=1
 given_order=0
+imap_foldersep=.
index a30574d..80719cb 100644 (file)
@@ -17,3 +17,4 @@ alias_same=0
 given_class=inetOrgPerson
 person=1
 given_order=0
+imap_foldersep=.
index a8a304e..bad8fb4 100644 (file)
@@ -17,3 +17,4 @@ alias_same=0
 given_class=inetOrgPerson
 person=1
 given_order=0
+imap_foldersep=.
index 253b7cf..96f0b66 100644 (file)
@@ -17,3 +17,4 @@ alias_same=0
 given_class=inetOrgPerson
 person=1
 given_order=0
+imap_foldersep=.
index ae3bf41..be54362 100644 (file)
@@ -17,3 +17,4 @@ alias_same=0
 other_class=inetOrgPerson
 person=1
 given_order=0
+imap_foldersep=.
index 0017cb6..052af9c 100644 (file)
@@ -23,3 +23,4 @@ alias_same=0
 given_class=inetOrgPerson
 person=1
 given_order=0
+imap_foldersep=.
index 926990a..81c2260 100644 (file)
@@ -18,3 +18,4 @@ alias_same=0
 given_class=inetOrgPerson
 person=1
 given_order=0
+imap_foldersep=.
index a30574d..80719cb 100644 (file)
@@ -17,3 +17,4 @@ alias_same=0
 given_class=inetOrgPerson
 person=1
 given_order=0
+imap_foldersep=.
index a30574d..80719cb 100644 (file)
@@ -17,3 +17,4 @@ alias_same=0
 given_class=inetOrgPerson
 person=1
 given_order=0
+imap_foldersep=.
index a30574d..80719cb 100644 (file)
@@ -17,3 +17,4 @@ alias_same=0
 given_class=inetOrgPerson
 person=1
 given_order=0
+imap_foldersep=.
index 8611a86..9084f59 100644 (file)
@@ -17,3 +17,4 @@ alias_same=0
 given_class=inetOrgPerson
 person=1
 given_order=0
+imap_foldersep=.
index 8611a86..9084f59 100644 (file)
@@ -17,3 +17,4 @@ alias_same=0
 given_class=inetOrgPerson
 person=1
 given_order=0
+imap_foldersep=.
index 8611a86..9084f59 100644 (file)
@@ -17,3 +17,4 @@ alias_same=0
 given_class=inetOrgPerson
 person=1
 given_order=0
+imap_foldersep=.
index 8396c20..383fde5 100644 (file)
@@ -72,6 +72,7 @@ imap_pass=Administration password for IMAP server,0
 imap_props=LDAP properties for new IMAP users,9,40,5,\t
 imap_folders=Folders to create for new IMAP users,9,30,3,\t
 imap_folderalt=Path for folders,1,1-user.$user.$folder,0-$folder
+imap_foldersep=Folder separator,1,.-.,/-/
 domain=Email domain for mail attribute,0,Don't add mail attributes
 mailfmt=Email address format,1,0-firstname.surname@domain,1-username@domain
 addressbook=Address book base,3,None
index bd2dad3..f3e5364 100644 (file)
@@ -871,26 +871,26 @@ local ($user, $quota) = @_;
 
 # Check if the user already exists
 local $imap = &imap_connect();
-local $rv = $imap->status("user.".$user->{'user'}, "messages");
+local $rv = $imap->status("user".$user{'imap_foldersep'}.$user->{'user'}, "messages");
 if ($rv->{'Status'} eq 'ok') {
        # Already exists, so do nothing
        $imap->logout();
        }
 else {
        # Create the user on the IMAP server
-       $rv = $imap->create("user.".$user->{'user'});
+       $rv = $imap->create("user".$config{'imap_foldersep'}.$user->{'user'});
        $rv->{'Status'} eq 'ok' ||
                &imap_error($text{'usave_eicreate'}, $rv);
 
        # Grant all rights to admin user
-       $rv = $imap->setacl("user.".$user->{'user'},
+       $rv = $imap->setacl("user".$config{'imap_foldersep'}.$user->{'user'},
                            $config{'imap_login'}, "lrswipcda");
        $rv->{'Status'} eq 'ok' ||
                &imap_error($text{'usave_eiacl'}, $rv);
 
        if (defined($quota)) {
                # Set his IMAP quota
-               $rv = $imap->setquota("user.".$user->{'user'},
+               $rv = $imap->setquota("user".$config{'imap_foldersep'}.$user->{'user'},
                                      "STORAGE", $quota);
                $rv->{'Status'} eq 'ok' ||
                        &imap_error($text{'usave_eiquota'}, $rv);
@@ -909,7 +909,7 @@ else {
 
        foreach $f (split(/\t+/, $config{'imap_folders'})) {
                local $fp = $config{'imap_folderalt'} ?
-                               "user.$user->{'user'}.$f" : $f;
+                               "user$config{'imap_foldersep'}$user->{'user'}$config{'imap_foldersep'}$f" : $f;
                $rv = $uimap->create($fp);
                $rv->{'Status'} eq 'ok' ||
                    &imap_error(&text('usave_eifolder',$f),$rv);
@@ -933,10 +933,10 @@ local ($user, $quota) = @_;
 
 # Check if the user already exists
 local $imap = &imap_connect();
-local $rv = $imap->status("user.".$user->{'user'}, "messages");
+local $rv = $imap->status("user".$config{'imap_foldersep'}.$user->{'user'}, "messages");
 if ($rv->{'Status'} eq 'ok') {
        # Set his IMAP quota
-       $rv = $imap->setquota("user.".$user->{'user'},
+       $rv = $imap->setquota("user".$config{'imap_foldersep'}.$user->{'user'},
                              "STORAGE", $quota);
        $rv->{'Status'} eq 'ok' ||
                &imap_error($text{'usave_eiquota'}, $rv);