doveadm complains about virtual namespace

Roberto Sanchez reven at reven.org
Sun Mar 6 22:30:29 UTC 2022


Hi,

I’ve setup my server __user__nd mail sending/receiving is all working without issue. However, a cron script that cleans up the Junk folder and runs:

doveadm expunge -A mailbox Junk  savedbefore 60d

gives out the following error:

doveadm(__user__ at example.com): Error: Namespace 'Virtual.': Unknown mail storage driver virtual

I don’t know if I have a configuration issue or if I have to load the virtual plugin at some other point in the config?

I would appreciate any help.

This is the output with debug enabled, and further below is my dovecot -n output (I’ve changed the user name to __user__ and the domain to example.com)

Debug: Loading modules from directory: /usr/lib/dovecot/modules/doveadm
Debug: Skipping module doveadm_acl_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_acl_plugin.so: undefined symbol: acl_user_module (this is usually intentional, so just ignore this message)
Debug: Skipping module doveadm_expire_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_expire_plugin.so: undefined symbol: expire_set_deinit (this is usually intentional, so just ignore this message)
Debug: Skipping module doveadm_quota_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_quota_plugin.so: undefined symbol: quota_user_module (this is usually intentional, so just ignore this message)
Debug: Module loaded: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_sieve_plugin.so
Debug: Skipping module doveadm_fts_lucene_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/lib20_doveadm_fts_lucene_plugin.so: undefined symbol: lucene_index_iter_deinit (this is usually intentional, so just ignore this message)
Debug: Skipping module doveadm_fts_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/lib20_doveadm_fts_plugin.so: undefined symbol: fts_user_get_language_list (this is usually intentional, so just ignore this message)
Debug: Skipping module doveadm_mail_crypt_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/libdoveadm_mail_crypt_plugin.so: undefined symbol: mail_crypt_box_get_pvt_digests (this is usually intentional, so just ignore this message)
Debug: auth-master: userdb list: Started listing users (user_mask=)
Debug: auth-master: conn unix:/var/run/dovecot/auth-userdb: Connecting
Debug: auth-master: conn unix:/var/run/dovecot/auth-userdb: Client connected (fd=10)
Debug: auth-master: userdb list: Returned username: __user__ at example.com
doveadm(__user__ at example.com)<1068593><>: Debug: auth-master: userdb lookup(__user__ at example.com): Started userdb lookup
doveadm(__user__ at example.com)<1068593><>: Debug: auth-master: conn unix:/var/run/dovecot/auth-userdb: Connecting
doveadm(__user__ at example.com)<1068593><>: Debug: auth-master: conn unix:/var/run/dovecot/auth-userdb: Client connected (fd=12)
doveadm(__user__ at example.com)<1068593><>: Debug: auth-master: userdb lookup(__user__ at example.com): auth USER input: __user__ at example.com maildir=example.com/__user__/ home=/var/mail/vhosts/example.com/__user__ uid=5000 gid=5000
doveadm(__user__ at example.com)<1068593><>: Debug: auth-master: userdb lookup(__user__ at example.com): Finished userdb lookup (username=__user__ at example.com maildir=example.com/__user__/ home=/var/mail/vhosts/example.com/__user__ uid=5000 gid=5000)
doveadm(__user__ at example.com)<1068593><>: Debug: Added userdb setting: plugin/maildir=example.com/__user__/
doveadm(__user__ at example.com): Debug: Effective uid=5000, gid=5000, home=/var/mail/vhosts/example.com/__user__
doveadm(__user__ at example.com): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/var/mail/vhosts/example.com/__user__/Maildir
doveadm(__user__ at example.com): Debug: maildir++: root=/var/mail/vhosts/example.com/__user__/Maildir, index=, indexpvt=, control=, inbox=/var/mail/vhosts/example.com/__user__/Maildir, alt=
doveadm(__user__ at example.com): Debug: Namespace virtual: type=private, prefix=Virtual., sep=., inbox=no, hidden=no, list=yes, subscriptions=yes location=virtual:/var/mail/virtual:INDEX=/var/mail/vhosts/example.com/__user__/virtual
doveadm(__user__ at example.com): Error: Namespace 'Virtual.': Unknown mail storage driver virtual



> dovecot -n
# 2.3.7.2 (3c910f64b): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.7.2 ()
# OS: Linux 5.16.3-x86_64-linode152 x86_64 Ubuntu 20.04.4 LTS 
# Hostname: bender.example.com
auth_mechanisms = plain login
auth_username_format = %u
mail_location = maildir:%h/Maildir
mail_privileged_group = vmail
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext
namespace inbox {
  inbox = yes
  location = 
  mailbox Archive {
    auto = subscribe
    special_use = \Archive
  }
  mailbox Drafts {
    auto = subscribe
    special_use = \Drafts
  }
  mailbox Junk {
    auto = subscribe
    autoexpunge = 30 days
    special_use = \Junk
  }
  mailbox Sent {
    auto = subscribe
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    auto = subscribe
    autoexpunge = 30 days
    special_use = \Trash
  }
  prefix = 
}
namespace virtual {
  list = yes
  location = virtual:/var/mail/virtual:INDEX=/var/mail/vhosts/%d/%n/virtual
  mailbox All {
    auto = subscribe
    comment = All my messages
    special_use = \All
  }
  mailbox Flagged {
    auto = subscribe
    comment = All my flagged messages
    special_use = \Flagged
  }
  prefix = Virtual.
  separator = .
  subscriptions = yes
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  sieve = file:%h/sieve;active=%h/dovecot.sieve
  sieve_before = /etc/dovecot/sieve/
}
postmaster_address = postmaster at example.com
protocols = imap lmtp sieve
service auth-worker {
  user = vmail
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-userdb {
    mode = 0600
    user = vmail
  }
  user = dovecot
}
service imap-login {
  inet_listener imap {
    port = 0
  }
  inet_listener imaps {
    port = 993
    ssl = yes
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}
service managesieve-login {
  inet_listener sieve {
    address = localhost
    port = 4190
  }
}
service stats {
  unix_listener stats-reader {
    group = www-data
    mode = 0660
    user = www-data
  }
  unix_listener stats-writer {
    group = www-data
    mode = 0660
    user = www-data
  }
}
ssl = required
ssl_cert = </etc/dovecot/private/dovecot.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
ssl_min_protocol = TLSv1.2
ssl_prefer_server_ciphers = yes
userdb {
  driver = prefetch
}
userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
userdb {
  args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
  driver = static
}
protocol lmtp {
  mail_plugins = " sieve virtual"
  postmaster_address = postmaster at example.com
}
protocol lda {
  mail_plugins = " virtual"
}
protocol imap {
  mail_plugins = " virtual"
}
protocol sieve {
  mail_plugins = virtual
}



More information about the dovecot mailing list