[Dovecot] dovecot with IMAP and POP3 mixed
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
# 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:
anmeyer@anup.de:{PLAIN}password:5000:5000::/var/spool/vhosts/anup.de/anmeyer::userdb_mail=maildir:~/ user7@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?
Kind regards
Andreas Meyer
A man, a miss, a car -- a curve, He kissed the miss and missed the curve -- Burma Shave (1948)
Mein öffentlicher GPG-Schlüssel unter: http://gpg-keyserver.de/pks/lookup?search=anmeyer&fingerprint=on&op=index
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:
anmeyer@anup.de:{PLAIN}password:5000:5000::/var/spool/vhosts/anup.de/anmeyer::userdb_mail=maildir:~/ user7@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.
Bill Cole wrote:
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.
Run the squirrelmail configure program and change the "default folder prefix" to blank under "folder defaults".
~Seth
On 3/21/09, Seth Mattinen wrote:
Bill Cole wrote:
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.
Run the squirrelmail configure program and change the "default folder prefix" to blank under "folder defaults".
~Seth
When I set up a squirrellmail with Dovecot, on the configuration pade id option D.
D. Set pre-defined settings for specific IMAP servers
I write in 'dovecot', and it sets a number of setting for me, for example:
Please select your IMAP server: bincimap = Binc IMAP server courier = Courier IMAP server cyrus = Cyrus IMAP server dovecot = Dovecot Secure IMAP server exchange = Microsoft Exchange IMAP server hmailserver = hMailServer macosx = Mac OS X Mailserver mercury32 = Mercury/32 uw = University of Washington's IMAP server
quit = Do not change anything
Command >> dovecot
imap_server_type = dovecot
default_folder_prefix = <none>
trash_folder = Trash
sent_folder = Sent
draft_folder = Drafts
show_prefix_option = false
default_sub_of_inbox = false
show_contain_subfolders_option = false optional_delimiter = detect delete_folder = false
-- Gary V
Gary V mr88talent@gmail.com schrieb:
Run the squirrelmail configure program and change the "default folder prefix" to blank under "folder defaults".
~Seth
When I set up a squirrellmail with Dovecot, on the configuration pade id option D.
D. Set pre-defined settings for specific IMAP servers
I write in 'dovecot', and it sets a number of setting for me, for example:
Please select your IMAP server: bincimap = Binc IMAP server courier = Courier IMAP server cyrus = Cyrus IMAP server dovecot = Dovecot Secure IMAP server exchange = Microsoft Exchange IMAP server hmailserver = hMailServer macosx = Mac OS X Mailserver mercury32 = Mercury/32 uw = University of Washington's IMAP server
quit = Do not change anything
Command >> dovecot
imap_server_type = dovecot default_folder_prefix = <none> trash_folder = Trash sent_folder = Sent draft_folder = Drafts show_prefix_option = false default_sub_of_inbox = false
show_contain_subfolders_option = false optional_delimiter = detect delete_folder = false
Yes, this is what I get too and the default_folder_prefix is empty.
-- Andreas Meyer
A man, a miss, a car -- a curve, He kissed the miss and missed the curve -- Burma Shave (1948)
Mein öffentlicher GPG-Schlüssel unter: http://gpg-keyserver.de/pks/lookup?search=anmeyer&fingerprint=on&op=index
On Sun, Mar 22, 2009 at 12:27:54PM +0100, Andreas Meyer wrote:
Yes, this is what I get too and the default_folder_prefix is empty.
I run dovecot with pop3, imap and squirrelmail with no problems.
The major difference I see between your dovecot -n and mine other than the fact that you have 1.0.5 and I have 1.2.beta3 is that I have
mail_location: mbox:~/Mail:INBOX=/var/spool/mail/%u
In other words, I specify one file for the INBOX and another directory for everything else. I don't think this works with maildir though.
-- Mark Sapiro mark at msapiro net The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hello!
Mark Sapiro mark@msapiro.net schrieb:
On Sun, Mar 22, 2009 at 12:27:54PM +0100, Andreas Meyer wrote:
Yes, this is what I get too and the default_folder_prefix is empty.
I run dovecot with pop3, imap and squirrelmail with no problems.
The major difference I see between your dovecot -n and mine other than the fact that you have 1.0.5 and I have 1.2.beta3 is that I have
Yes, this is a SuSE-rpm from openSuSE10.3
mail_location: mbox:~/Mail:INBOX=/var/spool/mail/%u
In other words, I specify one file for the INBOX and another directory for everything else. I don't think this works with maildir though.
I have the beast running. I found out that I had to create a directory where dovecot can write indexes and such things to.
# dovecot -n # 1.0.5: /etc/dovecot/dovecot.conf log_path: /var/log/dovecot1 protocols: imap imaps pop3 ssl_disable: yes disable_plaintext_auth: no 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: mbox:/var/spool/vhosts/%d/dovecotprivate/%n:INBOX=/var/spool/vhosts/%d/%n mail_debug: yes 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
So in dovecotprivate directories for the indexes are stored for mbox-users. This works, I had to set permissions to 777 for dovecotprivate so that dovecot can write into it. I don't know if this is a security-risk.
The /etc/dovecot/passwd then looks like this:
# anup.de (maildir) mail@anup.de:{PLAIN}passwd:5000:5000::/var/spool/vhosts/anup.de/mail::userdb_mail=maildir:~/ user@anup.de:{PLAIN}passwd:5000:5000::/var/spool/vhosts/anup.de/user::userdb_mail=maildir:~/
# anup.de (mbox) user7@anup.de:{PLAIN}passwd7:5000:5000 user8@anup.de:{PLAIN}passwd8:5000:5000
Works great and dovecot can handle both maildir and mbox for one domain. And this solved also the problem with Squirrelmail. The setup is not fully testet yet.
Thank you all!
Andreas Meyer
A man, a miss, a car -- a curve, He kissed the miss and missed the curve -- Burma Shave (1948)
Mein öffentlicher GPG-Schlüssel unter: http://gpg-keyserver.de/pks/lookup?search=anmeyer&fingerprint=on&op=index
Hello!
Seth Mattinen sethm@rollernet.us schrieb:
Bill Cole wrote:
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.
Run the squirrelmail configure program and change the "default folder prefix" to blank under "folder defaults".
The "default folder prefix" is empty.
~Seth
-- Andreas Meyer
A man, a miss, a car -- a curve, He kissed the miss and missed the curve -- Burma Shave (1948)
Mein öffentlicher GPG-Schlüssel unter: http://gpg-keyserver.de/pks/lookup?search=anmeyer&fingerprint=on&op=index
participants (5)
-
Andreas Meyer
-
Bill Cole
-
Gary V
-
Mark Sapiro
-
Seth Mattinen