Namespace configuration over SQL

Ain dovecot at luftivennad.com
Thu Sep 25 10:39:18 UTC 2014


Hello!

I had working setup, where namespace settings (including prefix) was
queried over SQL. Now, after installing new Dovecot to new server (using
same configuration), this is not working anymore.

Log shows following error:

"""
Initialization failed: namespace configuration error: list=yes requires
prefix=yes to end with separator
"""

relevant part from dovecot-sql.conf.ext:
"""
user_query = \
        SELECT \
                  1002 AS uid \
                , 1003 AS gid \
                , CONCAT('/www/home/vmail/domains/', SUBSTRING(d.name, 1,
1), '/', d.name, '/', u.username) AS home \
                , namespace_prefix AS 'namespace/default/prefix' \
                , 'yes' AS 'namespace/default/inbox' \
                , '%s' AS 'mail_service' \
        FROM vm_domain d \
        INNER JOIN vm_user u ON u.vm_domain_id = d.id \
        WHERE d.name = '%d' AND u.username = '%n' AND u.active = 1 AND
d.active = 1
"""

namespace_prefix can be empty or INBOX.

doveconf -n output:
"""
# 2.2.13: /usr/local/etc/dovecot/dovecot.conf
# OS: FreeBSD 9.3-RELEASE amd64
auth_debug = yes
auth_verbose = yes
disable_plaintext_auth = no
listen = *
mail_debug = yes
mail_location = maildir:~/Maildir
mmap_disable = yes
namespace default {
  inbox = yes
  list = yes
  location =
  prefix =
  separator = .
  type = private
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  mail_log_events = delete undelete expunge copy mailbox_delete
mailbox_rename flag_change append
  mail_log_fields = uid box msgid size
  mail_log_group_events = no
}
service imap {
  process_limit = 1480
}
ssl_cert = </usr/local/etc/ssl/server.crt
ssl_key = </usr/local/etc/ssl/server.key.unsecure
userdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
verbose_proctitle = yes
protocol imap {
  imap_capability = IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS
THREAD=ORDEREDSUBJECT MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS
LIST-EXTENDED I18NLEVEL=1 ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH
LIST-STATUS SPECIAL-USE
  mail_max_userip_connections = 900
}
protocol pop3 {
  mail_max_userip_connections = 300
}
"""

Seems like "prefix = " is interpreted as "prefix = yes".

How I can solve this?



More information about the dovecot mailing list