passwd-file extra-fields: inbox=yes
Michael Fox
news at mefox.org
Mon Aug 1 22:35:39 UTC 2016
I'd like to implement the virtual plugin so that POP3 users can see emails
in their own inbox and a public namespace. As I understand it, I need to
set "inbox=yes" separately, depending on which service the user is using.
With passwd-file flat files, this means:
userdb {
args = ... /path/userdb.%s
}
userdb.imap:
set the extra fields for each user =
userdb_namespace/inbox/inbox=yes
userdb.pop3:
set the extra fields for each user =
userdb_namespace/virtual/inbox=yes
But without even getting to the virtual namespace part, I'm having
difficulty getting the extra fields setting to work for a regular IMAP user.
Specifically:
If I use the Dovecot default settings of namespace inbox, which includes
inbox=yes, and do NOT include the extra_fields value shown above, then IMAP
users can log in OK.
But if I comment out inbox=yes within namespace inbox, and then add the
extra fields to userdb.imap (as shown above), (and reload doveadm), then the
IMAP user is no longer able to login. Thunderbird displays "Login to server
... failed." and I get the following in syslog (mail.err):
Aug 1 13:56:13 n6mef-gw dovecot: imap(mefimp at email.n6mef.org): Error: user
mefimp at email.n6mef.org: Initialization failed: namespace configuration
error: Duplicate namespace prefix: ""
Aug 1 13:56:13 n6mef-gw dovecot: imap(mefimp at email.n6mef.org): Error:
Invalid user settings. Refer to server log for more information.
I'm at a loss for what's wrong. Can someone help?
Userdb.imap test entry and doveconf -n below.
Thanks,
Michael
Userdb.imap:
mefimp::::Michael E Fox -
mefimp:::userdb_namespace=/namespace/inbox/inbox=yes
$ doveconf -n
# 2.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 3.16.0-76-generic x86_64 Ubuntu 14.04.4 LTS
auth_mechanisms = cram-md5
auth_verbose = yes
mail_gid = vmail
mail_location = maildir:~/Maildir
mail_plugins = " quota"
mail_uid = vmail
namespace inbox {
location =
mailbox Drafts {
special_use = \Drafts
}
mailbox Junk {
special_use = \Junk
}
mailbox Sent {
special_use = \Sent
}
mailbox "Sent Messages" {
special_use = \Sent
}
mailbox Trash {
special_use = \Trash
}
prefix =
}
passdb {
args = /etc/dovecot/deny-users
deny = yes
driver = passwd-file
}
passdb {
args = scheme=cram-md5 username_format=%n /etc/dovecot/auth.d/%d/passdb
driver = passwd-file
}
plugin {
quota = maildir:User quota
quota_grace = 10%%
quota_rule = *:storage=50MB
quota_rule2 = Trash:storage=+10%%
quota_status_nouser = DUNNO
quota_status_overquota = 552 5.2.2 Mailbox is full
quota_status_success = DUNNO
quota_status_toolarge = 552 5.2.3 Message is too large
quota_warning = storage=90%% quota-warning 90 %n %d
quota_warning2 = storage=75%% quota-warning 75 %n %d
}
pop3_lock_session = yes
protocols = pop3 imap lmtp
service auth {
unix_listener /var/spool/postfix/private/dovecot-auth {
group = postfix
mode = 0660
user = postfix
}
unix_listener auth-userdb {
group = vmail
mode = 0600
user = vmail
}
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
}
}
service pop3 {
executable = pop3 postlogin
process_limit = 25
}
service postlogin {
executable = script-login /etc/dovecot/postlogin.sh
group = vmail
user = vmail
}
service quota-status {
client_limit = 1
executable = quota-status -p postfix
inet_listener {
port = 12340
}
}
service quota-warning {
executable = /etc/dovecot/quota-warning.sh
user = vmail
}
ssl = required
ssl_cert = </opt/xsc/ssl/certs/n6mef-gw.crt
ssl_key = </opt/xsc/ssl/private/n6mef-gw.key
ssl_protocols = !SSLv2 !SSLv3
userdb {
args = username_format=%n /etc/dovecot/auth.d/%d/userdb.%s
default_fields = home=/var/vmail/%d/%n
driver = passwd-file
}
verbose_ssl = yes
protocol lmtp {
postmaster_address = xxxxxxxxxx
}
protocol imap {
mail_max_userip_connections = 1
}
protocol pop3 {
mail_max_userip_connections = 1
}
remote 192.168.7.0/24/24 {
ssl = yes
}
remote 192.168.7.0/27/27 {
ssl = no
}
$
More information about the dovecot
mailing list