[Dovecot] Virtual POP3 Inbox question
Hi,
I'm having trouble implementing the virtual pop3 inbox solution in Dovecot 1.2.x. As the following wiki page describes (http://wiki.dovecot.org/Plugins/Virtual) one should only set the inbox=yes flag for the virtual namespace which then flattens all mailboxes in the realmails/ prefix. In the above example when I set the inbox=yes flag for the virtual namespace, the inbox in the realmails/ prefix gets left out for obvious reasons. How did the original author intend this to work?
Regards, Jos
On Sun, 2010-02-07 at 15:10 +0100, Josephus wrote:
Hi,
I'm having trouble implementing the virtual pop3 inbox solution in Dovecot 1.2.x. As the following wiki page describes (http://wiki.dovecot.org/Plugins/Virtual) one should only set the inbox=yes flag for the virtual namespace
Yes.
which then flattens all mailboxes in the realmails/ prefix.
Huh? No..
In the above example when I set the inbox=yes flag for the virtual namespace, the inbox in the realmails/ prefix gets left out for obvious reasons.
I think you're misunderstanding/misinterpreting something, but I can't really think of what..
INBOX is a special mailbox. Setting inbox=yes changes nothing except where INBOX's location is looked up from. No other mailboxes are affected. Listing/opening RealMails/INBOX might or might not work, depending on configuration. But that shouldn't be an issue, since INBOX is accessed directly as INBOX.
Timo,
Thanks for clearing things up. I have finally figured it out (I hope)
INBOX is a special mailbox. Setting inbox=yes changes nothing except where INBOX's location is looked up from. No other mailboxes are affected. Listing/opening RealMails/INBOX might or might not work, depending on configuration. But that shouldn't be an issue, since INBOX is accessed directly as INBOX.
Well in order to list secret/INBOX I had to specify the INBOX location manually and use the dot separator scheme in a "/" separator setup.
mail_location = maildir:/mail/%d/%u/:INBOX=/mail/%d/%u/.INBOX
# Default namespace private { separator = / prefix = }
# Virtual namespace private { prefix = virtual/ separator = / location = virtual:/mail/virtual:INDEX=/mail/%d/%u/virtual
}
# Hidden namespace private { prefix = secret/ separator = / list = no hidden = yes }
My folder layout: .Drafts .INBOX .INBOX.test .Junk .Sent .Trash
dovecot-sql.conf:
# Userdb is fetched with the password check as userdb_ extra variables
password_query = SELECT password, allow_nets,
maildir as userdb_maildir, uid as userdb_uid,
gid as userdb_gid,
CASE '%s' WHEN 'pop3' THEN NULL ELSE 'yes' END AS
userdb_namespace_1_inbox,
CASE '%s' WHEN 'pop3' THEN 'yes' ELSE NULL END AS
userdb_namespace_2_inbox
FROM users WHERE username = '%u'
# Only used when no password is checked for users
# eg. deliver
user_query = SELECT maildir as home, maildir, uid, gid,
CASE '%s' WHEN 'pop3' THEN NULL ELSE 'yes' END AS
namespace_1_inbox,
CASE '%s' WHEN 'pop3' THEN 'yes' ELSE NULL END AS
namespace_2_inbox
FROM users WHERE username = '%u'
I'm using prefetch userdb so I had to put the namespace selection into the user_query as well.
BR, Jos
participants (2)
-
Josephus
-
Timo Sirainen