Andreas Meyer wrote, On 3/21/09 11:16 AM:
Hello!
I tried to setup dovecot to work with IMAP and POP3 but when I connect
with Squirrelmail, I get an error saying CREATE "INBOX.Sent"
reason: Mailbox doesn't allow inferior mailboxes
That's for user7, right?
The cause of that error is SquirrelMail (using IMAP) is trying to create a
mailbox as a child of INBOX, but since user7 is defined as using mbox
format, that fails. If you use mbox storage, an IMAP folder can have either
messages or subfolders but never both, because when using mbox an IMAP
folder containing messages is a file, while an IMAP folder containing
subfolders is a directory. See http://wiki.dovecot.org/MailboxFormat/mbox
for more info.
There *should* be some way to make SquirrelMail stop trying to create its
folders under INBOX, but I have no idea if there actually *is* one. Some
IMAP servers only allow the creation of folders as children of INBOX, and as
a result some (broken) IMAP clients only know how to create folders that
way. You can accommodate such software in Dovecot by using namespaces.
I think you should start by reading http://wiki.dovecot.org/MailLocation and
http://wiki.dovecot.org/Namespaces to understand your options.
# dovecot --version
1.0.5
# dovecot -n
# 1.0.5: /etc/dovecot/dovecot.conf
log_path: /var/log/dovecot
protocols: imap imaps pop3
ssl_disable: yes
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(pop3): /usr/lib/dovecot/pop3-login
mail_location: maildir:/var/spool/vhosts/%d/%n
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
pop3_uidl_format(default):
pop3_uidl_format(imap):
pop3_uidl_format(pop3): %08Xu%08Xv
auth default:
passdb:
driver: passwd-file
args: /etc/dovecot/passwd
userdb:
driver: passwd-file
args: /etc/dovecot/passwd
and /etc/dovecot/passwd looks like this:
anme...@anup.de:{PLAIN}password:5000:5000::/var/spool/vhosts/anup.de/anmeyer::userdb_mail=maildir:~/
us...@anup.de:{PLAIN}password7:5000:5000::/var/spool/vhosts/anup.de/user7::userdb_mail=mbox:~/:INBOX=/var/spool/vhosts/anup.de/%u
The mbox of user7 already exists. Can someone help to get both variants working
so that dovecot can handle IMAP and POP3 accounts?
This is not about POP3 and IMAP, it is about storage formats. POP3 and IMAP
are both able to use either maildir or mbox storage. Users are not
restricted to one or the other access protocol, no matter what storage
format they use.