Discussion:
Problem with virtual folders
Urban Loesch
2014-09-11 15:48:13 UTC
Permalink
Hi,

I'm trying to activate some virtual folders on a new installed dovecot server.
My plan is to have two virtual folders like "All" and perhaps "Unseen", like Gmail style for the first step.

- All: lists me all messages in the users mailbox
- Unseen: all unseen messages in the users mailbox


I'm using dovecot EE Release:
ii dovecot-ee-core 1:2.2.13.8-1 amd64 secure mail server that supports mbox, maildir, dbox and mdbox mailboxes
ii dovecot-ee-imapd 1:2.2.13.8-1 amd64 secure IMAP server that supports mbox, maildir, dbox and mdbox mailboxes
ii dovecot-ee-lmtpd 1:2.2.13.8-1 amd64 secure LMTP server for Dovecot
ii dovecot-ee-managesieved 0.4.3-1 amd64 secure ManageSieve server for Dovecot
ii dovecot-ee-mysql 1:2.2.13.8-1 amd64 MySQL support for Dovecot
ii dovecot-ee-sieve 0.4.3-1 amd64 sieve filters support for Dovecot

But I can't get it to work.
I can see the virtual folders in my Thunderbird, but the folders are empty and can't find any errors in mail log. I also tried it with "mail_debug = yes".

Below is my doveconf -n:
...
# 2.2.13.8 (71cc347a687c+): /etc/dovecot/dovecot.conf
# OS: Linux 3.4.67-vs2.3.3.9-rol-em64t-efigpt x86_64 Debian 7.6 ext4
auth_cache_negative_ttl = 0
auth_cache_ttl = 0
auth_debug = yes
auth_mechanisms = plain login
auth_verbose = yes
deliver_log_format = msgid=%m: %$ %p %w
disable_plaintext_auth = no
login_trusted_networks = $INTERNAL
mail_debug = yes
mail_gid = mailstore
mail_location = mdbox:/home/vmail/%d/%n:INDEX=/home/dovecotindex/%d/%n
mail_log_prefix = "%s(%u pid:%p session:<%{session}>): "
mail_plugins = " quota mail_log notify acl zlib stats virtual"
mail_shared_explicit_inbox = yes
mail_uid = mailstore
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 ihave duplicate
mdbox_rotate_size = 15 M
namespace {
list = children
location = mdbox:/home/vmail/%%d/%%n:INDEX=/home/dovecotindex/%%d/%%n
prefix = [shared]/%%u/
separator = /
subscriptions = yes
type = shared
}
namespace {
hidden = no
inbox = no
list = children
location = virtual:/home/virtual:INDEX=MEMORY
prefix = [virtual]/
separator = /
subscriptions = yes
type = private
}
namespace inbox {
inbox = yes
list = yes
location =
mailbox Drafts {
auto = subscribe
special_use = \Drafts
}
mailbox Sent {
auto = subscribe
special_use = \Sent
}
mailbox Trash {
auto = subscribe
special_use = \Trash
}
prefix =
separator = /
subscriptions = yes
type = private
}
passdb {
args = /etc/dovecot/dovecot-sql-account.conf
driver = sql
}
plugin {
acl = vfile
acl_shared_dict = file:/home/vmail/%d/shared-mailboxes
mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename flag_change save mailbox_create append
mail_log_fields = uid box msgid size from
mail_log_group_events = no
quota = dict:Storage used::file:%h/dovecot-quota
quota_rule2 = INBOX/Trash:storage=+100M
quota_warning = storage=95%% quota-warning 95 %u
quota_warning2 = storage=80%% quota-warning 80 %u
sieve = ~/.dovecot.sieve
sieve_dir = ~/sieve
sieve_max_redirects = 15
stats_command_min_time = 1 mins
stats_domain_min_time = 12 hours
stats_ip_min_time = 12 hours
stats_memory_limit = 32 M
stats_refresh = 30 secs
stats_session_min_time = 15 mins
stats_track_cmds = yes
stats_user_min_time = 1 hours
zlib_save = gz
zlib_save_level = 9
}
protocols = imap lmtp sieve
service auth {
unix_listener auth-userdb {
group = mailstore
mode = 0660
user = root
}
}
service imap-login {
inet_listener imap {
port = 143
}
process_limit = 256
process_min_avail = 25
service_count = 1
}
service imap {
process_limit = 256
process_min_avail = 25
service_count = 1
}
service lmtp {
inet_listener lmtp {
address = *
port = 24
}
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0666
user = postfix
}
}
service pop3-login {
inet_listener pop3 {
port = 110
}
process_limit = 256
process_min_avail = 25
service_count = 1
}
service pop3 {
process_limit = 256
process_min_avail = 25
service_count = 1
}
service quota-warning {
executable = script /usr/local/rol/dovecot/quota-warning.sh
unix_listener quota-warning {
user = mailstore
}
user = mailstore
}
service stats {
fifo_listener stats-mail {
mode = 0600
user = mailstore
}
}
ssl = no
submission_host = localhost:25
userdb {
args = /etc/dovecot/dovecot-sql-account.conf
driver = sql
}
protocol lmtp {
mail_fsync = optimized
mail_plugins = " quota mail_log notify acl zlib stats virtual sieve zlib"
}
protocol imap {
imap_client_workarounds = tb-extra-mailbox-sep
imap_id_log = *
imap_logout_format = bytes=%i/%o session=<%{session}>
mail_max_userip_connections = 40
mail_plugins = " quota mail_log notify acl zlib stats virtual imap_quota imap_acl imap_zlib imap_stats"
}
protocol pop3 {
mail_plugins = " quota mail_log notify acl zlib stats virtual"
pop3_logout_format = bytes_sent=%o top=%t/%p, retr=%r/%b, del=%d/%m, size=%s uidl_hash=%u session=<%{session}>
}
...

The virtual folders are stored in "/home/virtual/XXX" and are containg only the file "dovecot-virtual".

Like: "/home/virtual/All/dovecot-virtual":
<---------------------
*
all
--------------------->

Note:
I just have active virtual folders on a different dovecot server version "2:2.2.13-1~auto+74".
I copied the configuration from this server. The only three differences between the two servers are:

- Server version is different.
- The prefix of the default namespace on the new server is "prefix = INBOX/" and not "prefix ="
- Mail storage and index files are seperated in different folders on the new server.

Here are the relveant namespace configuraiton from the server where it ist working fine:
...
namespace {
list = children
location = mdbox:/home/vmail/%%d/%%n
prefix = shared/%%u/
separator = /
subscriptions = no
type = shared
}
namespace {
hidden = no
inbox = no
list = children
location = virtual:/home/virtual:INDEX=~/virtual
prefix = [rolmail]/
separator = /
subscriptions = yes
type = private
}
namespace inbox {
inbox = yes
location =
mailbox Drafts {
special_use = \Drafts
}
mailbox Junk {
special_use = \Junk
}
mailbox Sent {
special_use = \Sent
}
mailbox "Sent Items" {
special_use = \Sent
}
mailbox "Sent Messages" {
special_use = \Sent
}
mailbox Trash {
special_use = \Trash
}
prefix =
separator = /
type = private
}
...

Have you any hint for me how I can fix my problem.

Thanks and regards
Urban Loesch

Continue reading on narkive:
Loading...