[Dovecot] I can't setup namespace per user (with settings keept in sql db)
Hello! I'm trying to setup additional namespace. I'd like to have this setting per user and keep it in postgresql. Global namespace is defined in this way: namespace { inbox = yes location = prefix = separator = . } (mail_location is getting from db) I don't know how should looks like database field:( Now i have such configuration: user_query = select .... dovecot_location AS location, dovecot_namespace AS namespace FROM ...
In db i have this: # select dovecot_location, dovecot_namespace from exim_users where dovecot_namespace is not null; dovecot_location | dovecot_namespace ---------------------------+------------------- location="mdbox:~/.mdbox" | prefix="testn" (1 row)
but this isn't good configuration. I've got in log:
debug: sql(marcin@mejor.pl,62.121.127.119): SELECT '/dane/domeny/mejor.pl/mail/marcin/' as home, dovecot_typ_skrzynki ||':'|| '/dane/domeny/mejor.pl/mail/marcin/' ||' .'|| dovecot_typ_skrzynki as mail_location, '*:bytes='||quota_mb||'M' as quota_rule , dovecot_location AS location, dovecot_namespace AS namespace FROM exim_users WHE RE login = lower('marcin') AND domena = lower('mejor.pl') Debug: master out: USER#0112138832897#011marcin@mejor.pl#011home=/dane/domeny/mejor.pl/mail/marcin/#011mail_location=maildir:/dane/domeny/mejor.pl/mail/marcin/.maildi r#011quota_rule=*:bytes=0M#011location=location="mdbox:~/.mdbox"#011namespace=prefix="testn" Login: user=marcin@mejor.pl, method=CRAM-MD5, rip=62.121.127.119, lip=193.238.12.139, mpid=17929, TLS Debug: Loading modules from directory: /usr/lib/dovecot Debug: Module loaded: /usr/lib/dovecot/lib10_quota_plugin.so Debug: Module loaded: /usr/lib/dovecot/lib11_imap_quota_plugin.so Debug: Module loaded: /usr/lib/dovecot/lib15_notify_plugin.so Debug: Module loaded: /usr/lib/dovecot/lib20_autocreate_plugin.so Debug: Module loaded: /usr/lib/dovecot/lib20_fts_plugin.so Debug: Module loaded: /usr/lib/dovecot/lib20_mail_log_plugin.so Debug: Module loaded: /usr/lib/dovecot/lib20_zlib_plugin.so Debug: Module loaded: /usr/lib/dovecot/lib21_fts_squat_plugin.so Debug: Module loaded: /usr/lib/dovecot/lib30_imap_zlib_plugin.so Debug: Added userdb setting: mail_location=maildir:/dane/domeny/mejor.pl/mail/marcin/.maildir Debug: Added userdb setting: plugin/quota_rule=*:bytes=0M Debug: Added userdb setting: plugin/location=location="mdbox:~/.mdbox" Debug: Added userdb setting: namespace=prefix="testn" Debug: Effective uid=8, gid=12, home=/dane/domeny/mejor.pl/mail/marcin/ Debug: Quota root: name=User quota backend=dict args=:proxy::quota Debug: Quota rule: root=User quota mailbox=* bytes=0 messages=0 Debug: dict quota: user=marcin@mejor.pl, uri=proxy::quota, noenforcing=0 Debug: Namespace : type=private, prefix=, sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/dane/domeny/mejor.pl/mail/marcin/.maildir Debug: maildir++: root=/dane/domeny/mejor.pl/mail/marcin/.maildir, index=, control=, inbox=/dane/domeny/mejor.pl/mail/marcin/.maildir Debug: Namespace : type=private, prefix=, sep=, inbox=no, hidden=no, list=yes, subscriptions=yes location=maildir:/dane/domeny/mejor.pl/mail/marcin/.maildir Debug: maildir++: root=/dane/domeny/mejor.pl/mail/marcin/.maildir, index=, control=, inbox= Error: user marcin@mejor.pl: Initialization failed: namespace configuration error: Duplicate namespace prefix: "" Error: Invalid user settings. Refer to server log for more information.
I've got stuck, i don't have idea how configuration should looks:( Thanks for any help! dovceot-2.0.13
participants (1)
-
Marcin Mirosław