Hi, I've tried to do configure Virtual POP3 INBOX (dovecot version 2.2.18) as explained here http://wiki.dovecot.org/Plugins/Virtual with a static userdb and nopassword=y so I dont have any database on the dovecot server without the possibility to distinguish POP3 or IMAP in the userdb extra field to change the namespace on the fly. So I've put the namespace virtual informations inside the protocol pop3 { ... }, I did the same for the protocol imap { }: protocol pop3 { mail_plugins = $mail_plugins last_login virtual namespace inbox { prefix separator = / list = yes } namespace virtual { inbox = yes prefix = virtual/ separator = / location = virtual:/etc/dovecot/virtual:INDEX=MEMORY list = no hidden = yes } namespace real { prefix = RealMails/ separator = / list = no hidden = yes } } protocol imap { mail_plugins = $mail_plugins imap_quota last_login namespace inbox { inbox = yes } } protocol lda { mail_plugins = " quota sieve" namespace inbox { inbox = yes } } passdb { args = nopassword=y uid=vmail gid=vmail home=/var/mail/%2Mn/%2.2Mn/%n driver = static } userdb { args = nopassword=y uid=vmail gid=vmail home=/var/mail/%2Mn/%2.2Mn/%n driver = static } service quota-status { executable = quota-status -p postfix inet_listener { port = 12340 } process_min_avail = 8 } But the service quota-status getting lost with a message: namespace configuration error: inbox=yes namespace missing I didn't find a way to tell quota-status which namespace to use as you can't setup a default one. If I declare a "global" namespace inbox pop3 deamon fails because of duplicated namespace inbox in the configuration files: pop3(xxx): Error: User initialization failed: namespace configuration error: There can be only one namespace with inbox=yes Any idea before I will patch some piece of code to disable the unique restriction of inbox namespace ? Thanks, -- Aur?
Hi again, Le Wednesday 14 December 2016 ? 12:42, Aur?lien Beaujean ?crivait:> Any idea before I will patch some piece of code to disable the unique > restriction of inbox namespace ?I've found a way to address my problem, using the %s (protocol) in the configuration file, as this: namespace virtual { hidden = yes inbox = yes list = no location = virtual:/etc/dovecot/virtual/%s:INDEX=MEMORY prefix = virtual/ separator = / } With 2 different pop3 / imap dovecot-virtual files: # cat /etc/dovecot/virtual/imap/INBOX/dovecot-virtual !RealMails/INBOX all # cat /etc/dovecot/virtual/pop3/INBOX/dovecot-virtual !RealMails/INBOX RealMails/BOX1 RealMails/BOX2 all Consequence that dovecot-lda getting lost, so I had to patch the code to allow to override the namespace inbox configuration in the LDA protocol: protocol lda { mail_plugins = " virtual quota sieve" namespace inbox { inbox = yes location = prefix = } } That works but still brakes quota-status, which seems trying to get the size of /etc/dovecot/virtual/ instead of the size of the user mailbox. For information, such configuration created me those subdirs: /etc/dovecot/virtual/ /etc/dovecot/virtual/pop3 /etc/dovecot/virtual/pop3/INBOX /etc/dovecot/virtual/pop3/INBOX/dovecot-virtual /etc/dovecot/virtual/lda /etc/dovecot/virtual/imap /etc/dovecot/virtual/imap/.virtual-subscriptions /etc/dovecot/virtual/imap/INBOX /etc/dovecot/virtual/imap/INBOX/dovecot-virtual /etc/dovecot/virtual/quota-status /etc/dovecot/virtual/managesieve /etc/dovecot/virtual/doveadm If nobody has a last idea, it seems I will need to manually hardcode BOX1 & BOX2 in the POP3 daemon code to not break the rest of the dovecot processes. Thanks, -- Aur?
Hi, again replying to myself, Le Friday 23 December 2016 ? 14:53, Aur?lien Beaujean ?crivait:> I've found a way to address my problem, using the %s (protocol) in the > configuration file, as this:I've updated dovecot to v2.2.27, and configured POP3 this way, without other changes on IMAP or LDA: protocol pop3 { # Space separated list of plugins to load (default is global mail_plugins). mail_plugins = $mail_plugins last_login virtual # Virtual POP3 INBOX # The default namespace that is visible to IMAP clients namespace inbox { inbox = no prefix separator = / list = yes } # Virtual namespace for the virtual INBOX. Use a global directory for dovecot-virtual files. namespace virtual { inbox = yes prefix = virtual/ separator = / #location = virtual:/etc/dovecot/virtual:INDEX=~/Maildir/virtual location = virtual:/etc/dovecot/virtual:INDEX=MEMORY list = no hidden = yes } # Copy of the inbox namespace. We'll use this in dovecot-virtual file. namespace real { prefix = RealMails/ separator = / list = no hidden = yes } } With /etc/dovecot/virtual/INBOX/dovecot-virtual containing: RealMails/INBOX RealMails/BOX1 RealMails/BOX2 all Thanks to cmouse on #dovecot who helped me to get the right config. There is at least one problem left, if there is some subdirectory created inside INBOX, dovecot will stop to list you emails inside INBOX folder while POP3'ing. They remain visible when IMAP'ing. The only way to get back INBOX emails for POP3 users is to remove the virtual POP3 config... Or I am missing something here http://wiki.dovecot.org/Plugins/Virtual or there is a bug in the virtual plugin. -- Aur?