Hi!

Since upgrading to 2.1.6, setting namespaces via environment variables
using a imap-postlogin-script *sometimes* doesn't work.

Sometimes, the prefix of a namespace isn't set correctly, but is set to
an empty string, which leads to the following error:
namespace configuration error: Duplicate namespace prefix: ""

However, the environment is set correctly, the error seems to occur when
parsing the environment.

See the attached log:
The postlogin-script sets the environment variables attached as
dovecot-postlogin-environment.txt. (dumped from postlogin script via env)

However, the variable "NAMESPACE/S-GSD/PREFIX=Shared/GSD/" gets parsed
as: plugin/namespace/s-gsd/prefix=Shared/GSD/

See the error message:
Unknown userdb setting: plugin/namespace/s-gsd/prefix=Shared/GSD/

After restarting dovecot, the same configuration sometimes works correctly.

I'd greatly appreciate your help! Unfortunately I have done the upgrade
on a production system, so the issue is quite serious for me..

Will downgrading to 2.0 work? (Index-files, etc?)

Thanks,
--leo
-- 
e-mail   ::: Leo.Bergolth (at) wu.ac.at
fax      ::: +43-1-31336-906050
location ::: IT-Services | Vienna University of Economics | Austria

May 13 23:00:22 samba dovecot: imap-login: Login: user=<abergolth>, 
method=PLAIN, rip=172.23.60.1, lip=172.23.60.3, mpid=10588, secured, 
session=<RLIAQvG/5wCsFzwB>
May 13 23:00:22 samba dovecot: imap-postlogin: Error: adding 
NAMESPACE/S-GSD/PREFIX /var/spool/mail/Shared/GSD
May 13 23:00:22 samba dovecot: imap-postlogin: Error: adding 
NAMESPACE/S-KIT/PREFIX /var/spool/mail/Shared/KIT
May 13 23:00:22 samba dovecot: imap-postlogin: Error: adding 
NAMESPACE/S-RUFHILFE/PREFIX /var/spool/mail/Shared/Rufhilfe
May 13 23:00:22 samba dovecot: imap-postlogin: Error: adding 
NAMESPACE/S-SEF/PREFIX /var/spool/mail/Shared/SEF
May 13 23:00:22 samba dovecot: imap-postlogin: Error: adding 
NAMESPACE/S-HOMEPAGE/PREFIX /var/spool/mail/Shared/homepage
May 13 23:00:22 samba dovecot: imap: Debug: Unknown userdb setting: 
plugin/namespace/s-gsd/prefix=Shared/GSD/
May 13 23:00:22 samba dovecot: imap: Debug: Unknown userdb setting: 
plugin/namespace/s-rufhilfe/location=maildir:/var/spool/mail/Shared/Rufhilfe:INDEX=~/Maildir/index/Shared/Rufhilfe
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace=s-gsd s-kit s-rufhilfe s-sef s-homepage
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace/s-rufhilfe/separator=/
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace/s-rufhilfe/list=yes
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace/s-sef/separator=/
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace/s-kit/location=maildir:/var/spool/mail/Shared/KIT:INDEX=~/Maildir/index/Shared/KIT
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace/s-homepage/separator=/
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace/s-homepage/prefix=Shared/homepage/
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace/s-sef/location=maildir:/var/spool/mail/Shared/SEF:INDEX=~/Maildir/index/Shared/SEF
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace/s-gsd/location=maildir:/var/spool/mail/Shared/GSD:INDEX=~/Maildir/index/Shared/GSD
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace/s-homepage/type=public
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace/s-homepage/location=maildir:/var/spool/mail/Shared/homepage:INDEX=~/Maildir/index/Shared/homepage
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace/s-gsd/separator=/
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace/s-sef/prefix=Shared/SEF/
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace/s-kit/prefix=Shared/KIT/
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace/s-sef/list=yes
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace/s-rufhilfe/type=public
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace/s-kit/type=public
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace/s-sef/type=public
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace/s-homepage/list=yes
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace/s-rufhilfe/prefix=Shared/Rufhilfe/
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace/s-kit/separator=/
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace/s-kit/list=yes
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace/s-gsd/list=yes
May 13 23:00:22 samba dovecot: imap: Debug: Added userdb setting: 
namespace/s-gsd/type=public
May 13 23:00:22 samba dovecot: imap(abergolth): Debug: Effective uid=1162, 
gid=1000, home=/home/abergolth
May 13 23:00:22 samba dovecot: imap(abergolth): Debug: Namespace inbox: 
type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes 
location=mbox:~/mail:INBOX=/var/mail/abergolth
May 13 23:00:22 samba dovecot: imap(abergolth): Debug: fs: 
root=/home/abergolth/mail, index=, control=, inbox=/var/mail/abergolth, alt=
May 13 23:00:22 samba dovecot: imap(abergolth): Debug: Namespace : type=public, 
prefix=, sep=/, inbox=no, hidden=no, list=yes, subscriptions=yes 
location=maildir:/var/spool/mail/Shared/GSD:INDEX=~/Maildir/index/Shared/GSD
May 13 23:00:22 samba dovecot: imap(abergolth): Debug: maildir++: 
root=/var/spool/mail/Shared/GSD, 
index=/home/abergolth/Maildir/index/Shared/GSD, control=, inbox=, alt=
May 13 23:00:22 samba dovecot: imap(abergolth): Debug: Namespace : type=public, 
prefix=Shared/KIT/, sep=/, inbox=no, hidden=no, list=yes, subscriptions=yes 
location=maildir:/var/spool/mail/Shared/KIT:INDEX=~/Maildir/index/Shared/KIT
May 13 23:00:22 samba dovecot: imap(abergolth): Debug: maildir++: 
root=/var/spool/mail/Shared/KIT, 
index=/home/abergolth/Maildir/index/Shared/KIT, control=, inbox=, alt=
May 13 23:00:22 samba dovecot: imap(abergolth): Debug: Namespace : type=public, 
prefix=Shared/Rufhilfe/, sep=/, inbox=no, hidden=no, list=yes, 
subscriptions=yes location=mbox:~/mail:INBOX=/var/mail/abergolth
May 13 23:00:22 samba dovecot: imap(abergolth): Debug: fs: 
root=/home/abergolth/mail, index=, control=, inbox=/var/mail/abergolth, alt=
May 13 23:00:22 samba dovecot: imap(abergolth): Debug: Namespace : type=public, 
prefix=Shared/SEF/, sep=/, inbox=no, hidden=no, list=yes, subscriptions=yes 
location=maildir:/var/spool/mail/Shared/SEF:INDEX=~/Maildir/index/Shared/SEF
May 13 23:00:22 samba dovecot: imap(abergolth): Debug: maildir++: 
root=/var/spool/mail/Shared/SEF, 
index=/home/abergolth/Maildir/index/Shared/SEF, control=, inbox=, alt=
May 13 23:00:22 samba dovecot: imap(abergolth): Debug: Namespace : type=public, 
prefix=Shared/homepage/, sep=/, inbox=no, hidden=no, list=yes, 
subscriptions=yes 
location=maildir:/var/spool/mail/Shared/homepage:INDEX=~/Maildir/index/Shared/homepage
May 13 23:00:22 samba dovecot: imap(abergolth): Debug: maildir++: 
root=/var/spool/mail/Shared/homepage, 
index=/home/abergolth/Maildir/index/Shared/homepage, control=, inbox=, alt=
May 13 23:00:22 samba dovecot: imap(abergolth): Error: user abergolth: 
Initialization failed: namespace configuration error: Duplicate namespace 
prefix: ""
May 13 23:00:22 samba dovecot: imap(abergolth): Error: Invalid user settings. 
Refer to server log for more information.
GID=1000
HOME=/home/abergolth
IP=172.23.60.1
LOCAL_IP=172.23.60.3
NAMESPACE/S-GSD/LIST=yes
NAMESPACE/S-GSD/LOCATION=maildir:/var/spool/mail/Shared/GSD:INDEX=~/Maildir/index/Shared/GSD
NAMESPACE/S-GSD/PREFIX=Shared/GSD/
NAMESPACE/S-GSD/SEPARATOR=/
NAMESPACE/S-GSD/TYPE=public
NAMESPACE/S-HOMEPAGE/LIST=yes
NAMESPACE/S-HOMEPAGE/LOCATION=maildir:/var/spool/mail/Shared/homepage:INDEX=~/Maildir/index/Shared/homepage
NAMESPACE/S-HOMEPAGE/PREFIX=Shared/homepage/
NAMESPACE/S-HOMEPAGE/SEPARATOR=/
NAMESPACE/S-HOMEPAGE/TYPE=public
NAMESPACE/S-KIT/LIST=yes
NAMESPACE/S-KIT/LOCATION=maildir:/var/spool/mail/Shared/KIT:INDEX=~/Maildir/index/Shared/KIT
NAMESPACE/S-KIT/PREFIX=Shared/KIT/
NAMESPACE/S-KIT/SEPARATOR=/
NAMESPACE/S-KIT/TYPE=public
NAMESPACE/S-RUFHILFE/LIST=yes
NAMESPACE/S-RUFHILFE/LOCATION=maildir:/var/spool/mail/Shared/Rufhilfe:INDEX=~/Maildir/index/Shared/Rufhilfe
NAMESPACE/S-RUFHILFE/PREFIX=Shared/Rufhilfe/
NAMESPACE/S-RUFHILFE/SEPARATOR=/
NAMESPACE/S-RUFHILFE/TYPE=public
NAMESPACE/S-SEF/LIST=yes
NAMESPACE/S-SEF/LOCATION=maildir:/var/spool/mail/Shared/SEF:INDEX=~/Maildir/index/Shared/SEF
NAMESPACE/S-SEF/PREFIX=Shared/SEF/
NAMESPACE/S-SEF/SEPARATOR=/
NAMESPACE/S-SEF/TYPE=public
NAMESPACE=s-gsd s-kit s-rufhilfe s-sef s-homepage
PWD=/var/run/dovecot
RESTRICT_SETGID=1000
RESTRICT_SETGID_PRIV=12
SHLVL=1
SYSTEM_GROUPS_USER=abergolth
UID=1162
USER=abergolth
USERDB_KEYS=SYSTEM_GROUPS_USER UID GID HOME  NAMESPACE/S-GSD/PREFIX 
NAMESPACE/S-RUFHILFE/LOCATION NAMESPACE NAMESPACE/S-RUFHILFE/SEPARATOR 
NAMESPACE/S-RUFHILFE/LIST NAMESPACE/S-SEF/SEPARATOR NAMESPACE/S-KIT/LOCATION 
NAMESPACE/S-HOMEPAGE/SEPARATOR NAMESPACE/S-HOMEPAGE/PREFIX 
NAMESPACE/S-SEF/LOCATION NAMESPACE/S-GSD/LOCATION NAMESPACE/S-HOMEPAGE/TYPE 
NAMESPACE/S-HOMEPAGE/LOCATION NAMESPACE/S-GSD/SEPARATOR NAMESPACE/S-SEF/PREFIX 
NAMESPACE/S-KIT/PREFIX NAMESPACE/S-SEF/LIST NAMESPACE/S-RUFHILFE/TYPE 
NAMESPACE/S-KIT/TYPE NAMESPACE/S-SEF/TYPE NAMESPACE/S-HOMEPAGE/LIST 
NAMESPACE/S-RUFHILFE/PREFIX NAMESPACE/S-KIT/SEPARATOR NAMESPACE/S-KIT/LIST 
NAMESPACE/S-GSD/LIST NAMESPACE/S-GSD/TYPE
_=/bin/env

Attachment: dovecot-post-login.pl
Description: Perl program

Reply via email to