I'm trying to follow the guide at https://wiki.dovecot.org/Plugins/Virtual for the 'Conversation' style virtual mailbox, but with a small change. I'd like the virtual mailboxes to be 'top level', which I found while searching through this list is accomplishable by putting the dovecot-virtual file in the root of the namespace location. My issue is this works perfectly fine for the All Mail virtual mailbox, but the Threaded mailbox fails with the error above. I tried creating a RealMail namespace, but that doesn't solve the issue either. I feel like I must be overlooking something simple; I could get this setup working if the virtual mailboxes shared a namespace and were subfolders, but I don't like that setup much (I'm trying to get my companies GMail users on to our own webmail client, it's features like this that I need to replicate with dovecot or they'll never leave their POP3 setups).

I've attached the output of dovecot -n, and my virtual mailboxes look like this:

# cat Threaded/dovecot-virtual
All
 inthread refs x-mailbox INBOX

# cat all/dovecot-virtual
RealMail
RealMail/*
-RealMail/Trash
-RealMail/Trash/*
-RealMail/Spam
-RealMail/Spam/*
  all

I'd appreciate any insight in to this issue. If I try to access the Threaded Inbox through IMAP, I get this error specifically:
a select "Threaded Inbox"
a NO [SERVERBUG] Virtual mailbox open failed because of mailbox All: Internal error occurred. Refer to server log for more information. [2017-04-03 00:24:28]

The relevant line being: Apr 3 00:24:28 mail dovecot: imap(d...@redchops.com): Error: Virtual mailbox loops:
No information before or after.

Thanks,
-Dan
# 2.2.10: /etc/dovecot/dovecot.conf
# OS: Linux 4.4.51-40.58.amzn1.x86_64 x86_64  
auth_mechanisms = plain login
first_valid_uid = 200
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
mail_gid = 12
mail_home = /mnt/vmail/%d/%n
mail_location = maildir:~:LAYOUT=fs
mail_plugins = " virtual"
mail_uid = 200
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
mbox_write_locks = fcntl
namespace all_mail {
  hidden = no
  list = yes
  location = virtual:/mnt/vmail/%d/virtual/all:INDEX=MEMORY
  prefix = All/
  separator = /
  subscriptions = no
}
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
    auto = subscribe
    special_use = \Drafts
  }
  mailbox Sent {
    auto = subscribe
    special_use = \Sent
  }
  mailbox Spam {
    auto = subscribe
    special_use = \Junk
  }
  mailbox Trash {
    auto = subscribe
    special_use = \Trash
  }
  prefix = 
  separator = /
}
namespace real {
  hidden = no
  list = no
  location = 
  prefix = RealMail/
  separator = /
}
namespace threaded {
  hidden = no
  list = yes
  location = virtual:/mnt/vmail/%d/virtual/Threaded:INDEX=MEMORY
  prefix = Threaded Inbox/
  separator = /
  subscriptions = yes
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
plugin {
  sieve = ~/.dovecot.sieve
  sieve_before = /etc/dovecot/sieve/default.sieve
  sieve_dir = /mnt/vmail/%d/sieve/%n
  sieve_global = /etc/dovecot/sieve/global/
  sieve_max_script_size = 1M
}
protocols = imap lmtp sieve
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-master {
    mode = 0600
    user = mailreader
  }
  unix_listener auth-userdb {
    group = mail
    mode = 0600
    user = mailreader
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }
}
ssl = required
ssl_cert = </etc/pki/tls/certs/dovecot.pem
ssl_cipher_list = AES128+EECDH:AES128+EDH
ssl_dh_parameters_length = 4096
ssl_key = </etc/pki/tls/private/server.pem
ssl_prefer_server_ciphers = yes
ssl_protocols = !SSLv2 !SSLv3
userdb {
  driver = prefetch
}
userdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
protocol lmtp {
  hostname = mail.redchops.com
  lmtp_save_to_detail_mailbox = yes
  mail_plugins = " virtual autocreate sieve quota"
  postmaster_address = postmas...@redchops.com
  recipient_delimiter = +
}
protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  info_log_path = /var/log/dovecot-lda.log
  log_path = /var/log/dovecot-lda-errors.log
  mail_plugins = " virtual sieve"
}
protocol imap {
  mail_plugins = " virtual"
}
protocol sieve {
  info_log_path = /var/log/dovecot-sieve.log
  log_path = /var/log/dovecot-sieve-errors.log
  managesieve_implementation_string = dovecot
  managesieve_max_line_length = 65536
}

Reply via email to