mirror of
https://github.com/webmin/webmin.git
synced 2026-05-04 22:30:33 +01:00
IMAP folder separator option
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -18,3 +18,4 @@ alias_same=0
|
||||
given_class=inetOrgPerson
|
||||
person=1
|
||||
given_order=0
|
||||
imap_foldersep=.
|
||||
|
||||
@@ -18,3 +18,4 @@ alias_same=0
|
||||
given_class=inetOrgPerson
|
||||
person=1
|
||||
given_order=0
|
||||
imap_foldersep=.
|
||||
|
||||
@@ -17,3 +17,4 @@ alias_same=0
|
||||
given_class=inetOrgPerson
|
||||
person=1
|
||||
given_order=0
|
||||
imap_foldersep=.
|
||||
|
||||
@@ -17,3 +17,4 @@ alias_same=0
|
||||
given_class=inetOrgPerson
|
||||
person=1
|
||||
given_order=0
|
||||
imap_foldersep=.
|
||||
|
||||
@@ -17,3 +17,4 @@ alias_same=0
|
||||
given_class=inetOrgPerson
|
||||
person=1
|
||||
given_order=0
|
||||
imap_foldersep=.
|
||||
|
||||
@@ -17,3 +17,4 @@ alias_same=0
|
||||
other_class=inetOrgPerson
|
||||
person=1
|
||||
given_order=0
|
||||
imap_foldersep=.
|
||||
|
||||
@@ -23,3 +23,4 @@ alias_same=0
|
||||
given_class=inetOrgPerson
|
||||
person=1
|
||||
given_order=0
|
||||
imap_foldersep=.
|
||||
|
||||
@@ -18,3 +18,4 @@ alias_same=0
|
||||
given_class=inetOrgPerson
|
||||
person=1
|
||||
given_order=0
|
||||
imap_foldersep=.
|
||||
|
||||
@@ -17,3 +17,4 @@ alias_same=0
|
||||
given_class=inetOrgPerson
|
||||
person=1
|
||||
given_order=0
|
||||
imap_foldersep=.
|
||||
|
||||
@@ -17,3 +17,4 @@ alias_same=0
|
||||
given_class=inetOrgPerson
|
||||
person=1
|
||||
given_order=0
|
||||
imap_foldersep=.
|
||||
|
||||
@@ -17,3 +17,4 @@ alias_same=0
|
||||
given_class=inetOrgPerson
|
||||
person=1
|
||||
given_order=0
|
||||
imap_foldersep=.
|
||||
|
||||
@@ -17,3 +17,4 @@ alias_same=0
|
||||
given_class=inetOrgPerson
|
||||
person=1
|
||||
given_order=0
|
||||
imap_foldersep=.
|
||||
|
||||
@@ -17,3 +17,4 @@ alias_same=0
|
||||
given_class=inetOrgPerson
|
||||
person=1
|
||||
given_order=0
|
||||
imap_foldersep=.
|
||||
|
||||
@@ -17,3 +17,4 @@ alias_same=0
|
||||
given_class=inetOrgPerson
|
||||
person=1
|
||||
given_order=0
|
||||
imap_foldersep=.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user