[Dovecot] Virtual POP3 Inbox question
Josephus
josephus at josephus.hu
Sat Feb 20 22:31:28 EET 2010
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
More information about the dovecot
mailing list