per-user virtual mailboxes

at lbutlr at lbutlr
Fri Mar 16 23:06:51 EET 2018


Have given up on getting the global virtual config for now, and am trying to setup the virtual mailboxes for just my user account. Basically, it's behaving exactly as it did when I was trying to use a global config. This, and the lack of errors, is causing me to think that it is something odd in my install as opposed to a configuration issue (full doveconf -n at end)

mail_location = maildir:~/Maildir
mail_plugins = " virtual"
namespace {
  location = virtual:~/Maildir/virtual:LAYOUT=maildir++
  prefix = virtual.
  separator = .
}

# ldd `which dovecot`
/usr/local/sbin//dovecot:
        libdovecot.so.0 => /usr/local/lib/dovecot/libdovecot.so.0 (0x28085000)
        libc.so.7 => /lib/libc.so.7 (0x28184000)
# cd ~kremels/Maildir
# ls -lsR virtual/
total 24
8 drwxr-xr-x  2 kremels  kremels  512 Mar 16 14:40 .day
8 drwxr-xr-x  2 kremels  kremels  512 Mar 16 14:40 .month
8 drwxr-xr-x  2 kremels  kremels  512 Mar 16 14:40 .unread

virtual/.day:
total 16
8 -rwxr-xr-x  1 kremels  kremels   62 Mar 16 14:15 dovecot-vitual
8 -rwxr-xr-x  1 kremels  kremels  392 Mar 13 07:12 dovecot.index.log

virtual/.month:
total 8
8 -rwxr-xr-x  1 kremels  kremels  66 Mar 16 14:15 dovecot-vitual

virtual/.unread:
total 16
8 -rwxr-xr-x  1 kremels  kremels   11 Mar 16 14:15 dovecot-vitual
8 -rwxr-xr-x  1 kremels  kremels  256 Mar 16 14:42 dovecot.index.log
# doveadm search mailbox "virtual.unread" -u kremels 

(nothing)

# cat .virtual.unread/dovecot-vitual 
# ~/Maildir/virtual/.day/dovecot-virtual
*
  unseen
# doveadm mailbox list -u kremels | grep virt
virtual.unread
virtual.month
virtual.day
virtual
#

Again, the "virtual" mailbox shows up, it contains three mailboxes (day, month, unread), and all are empty.

I've added :LAYOUT=maildir++ in the location but I also tried using the "fs" layout and just creating folders under ~/Maildir/virtual, but results where the same. I've read https://wiki2.dovecot.org/Plugins/Virtual many times and I feel I must be missing something, but no idea what and with no errors it's proving impossible for me to figure it out.

full conf:

# doveconf -n
# 2.2.34 (874deae): /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.22 (22940fb7)
# OS: FreeBSD 11.1-RELEASE-p4 i386  
# Hostname: mail.covisp.net
auth_failure_delay = 5 secs
auth_mechanisms = PLAIN LOGIN
default_client_limit = 4096
default_process_limit = 1024
default_vsz_limit = 768 M
disable_plaintext_auth = no
first_valid_uid = 89
imap_id_log = *
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
log_path = /var/log/dovecot
login_log_format_elements = user=<%u> %r %m %c
mail_location = maildir:~/Maildir
mail_max_userip_connections = 90
mail_plugins = " virtual"
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 imapsieve vnd.dovecot.imapsieve
namespace {
  location = virtual:~/Maildir/virtual:LAYOUT=maildir++
  prefix = virtual.
  separator = .
}
namespace inbox {
  inbox = yes
  location = 
  mailbox Archive {
    auto = subscribe
    special_use = \Archive
  }
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    auto = subscribe
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix = 
}
passdb {
  driver = pam
  username_filter = !*@*
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  imapsieve_mailbox1_before = file:/usr/lib/dovecot/sieve/report-spam.sieve
  imapsieve_mailbox1_causes = COPY
  imapsieve_mailbox1_name = Junk
  imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve
  imapsieve_mailbox2_causes = COPY
  imapsieve_mailbox2_from = Junk
  imapsieve_mailbox2_name = *
  sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment
  sieve_pipe_bin_dir = /usr/lib/dovecot/sieve
  sieve_plugins = sieve_imapsieve sieve_extprograms
}
protocols = imap pop3
service auth {
  unix_listener /var/spool/postfix/private/auth {
    mode = 0666
  }
}
service imap-login {
  inet_listener imaps {
    port = 993
    ssl = yes
  }
}
service pop3-login {
  inet_listener pop3 {
    port = 0
  }
  inet_listener pop3s {
    port = 995
    ssl = yes
  }
}
ssl_cert = </usr/local/etc/dehydrated/certs/covisp.net/fullchain.pem
ssl_key =  # hidden, use -P to show it
userdb {
  driver = passwd
}
userdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  default_fields = uid=vpopmail gid=vchkpw mail_location=/usr/local/virtual/%u mail=maildir:/usr/local/virtual/%u
  driver = sql
}
protocol imap {
  mail_plugins = " virtual imap_sieve"
}



More information about the dovecot mailing list