[Dovecot] Convert plugin mbox to maildir has no effect
Convert plugin seems to have no effect with dovecot-1.0.rc26 and my settings.
When a user log, maildir creation is successful, but no mbox conversion occur. New incoming mails are dropped into maildir, but I cant access those in Mbox file.
I set the following in dovecot.con as describe on wiki.
mail_location: maildir:/var/mail/Maildir/%u convert_mail: mbox:/var/mail:INBOX=/var/mail/%u
Any thoughts ? Is there a particular settings to use ? Anything wrong with my setup ?
Logs :
dovecot: [ID 107833 mail.info] pop3-login: Login: user=<sts>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured dovecot: [ID 107833 mail.info] POP3(sts): Effective uid=45842, gid=10008 dovecot: [ID 107833 mail.info] POP3(sts): maildir: data=/var/mail/Maildir/sts dovecot: [ID 107833 mail.info] POP3(sts): maildir: root=/var/mail/Maildir/sts, index=/var/mail/Maildir/sts, control=, inbox= dovecot: [ID 107833 mail.info] POP3(sts): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
dovecot -n :
protocols: pop3 ssl_disable: yes disable_plaintext_auth: no shutdown_clients: no login_dir: /var/run/dovecot/login login_executable: /var/mail/bin/dovecot-1.0.rc26_devsol10/libexec/dovecot/pop3-login login_greeting: ready. mail_extra_groups: mail mail_location: maildir:/var/mail/Maildir/%u mail_debug: yes mail_full_filesystem_access: yes mmap_disable: yes mbox_write_locks: fcntl mail_executable: /var/mail/bin/dovecot-1.0.rc26_devsol10/libexec/dovecot/pop3 mail_plugin_dir: /var/mail/bin/dovecot-1.0.rc26_devsol10/lib/dovecot/pop3 pop3_uidl_format: %08Xu%08Xv pop3_client_workarounds: outlook-no-nuls oe-ns-eoh auth default: verbose: yes passdb: driver: passwd passdb: driver: shadow userdb: driver: passwd socket: type: listen client: master: path: /var/run/dovecot/auth-master mode: 384 plugin: convert_mail: mbox:/var/mail:INBOX=/var/mail/%u convert_skip_broken_mailboxes: no
On Fri, 2007-03-09 at 14:54 +0100, Sylvain Nemtua wrote:
convert_mail: mbox:/var/mail:INBOX=/var/mail/%u
This is most likely wrong. You're telling Dovecot that the user's non-INBOX mailboxes are in /var/mail. If you have only inboxes, set rather something like mbox:/some/empty/dir:INBOX=/var/mail/% u:INDEX=MEMORY
Hmm. Since this seems to be so common problem, maybe I should make "mbox::INBOX=/var/mail/%u" work too..
Any thoughts ? Is there a particular settings to use ? Anything wrong with my setup ?
The real problem is that you didn't tell Dovecot to load the convert plugin:
mail_plugins = convert
On Fri, 09 Mar 2007 15:58:59 +0200 Timo Sirainen wrote:
On Fri, 2007-03-09 at 14:54 +0100, Sylvain Nemtua wrote:
convert_mail: mbox:/var/mail:INBOX=/var/mail/%u
This is most likely wrong. You're telling Dovecot that the user's non-INBOX mailboxes are in /var/mail. If you have only inboxes, set rather something like mbox:/some/empty/dir:INBOX=/var/mail/% u:INDEX=MEMORY
Hmm. Since this seems to be so common problem, maybe I should make "mbox::INBOX=/var/mail/%u" work too..
Any thoughts ? Is there a particular settings to use ? Anything wrong with my setup ?
The real problem is that you didn't tell Dovecot to load the convert plugin:
mail_plugins = convert
I have a similiar problem with dovecot 1.0.rc31. Please note that /usr/dovecot is a link to /usr/local/dovecot on my system.
/usr/dovecot/sbin/dovecot -n # /usr/local/dovecot/etc/dovecot.conf base_dir: /var/run/dovecot/ protocols: imap listen: *:10143 ssl_disable: yes disable_plaintext_auth: no login_dir: /var/run/dovecot//login login_executable: /usr/dovecot/libexec/dovecot/imap-login login_log_format_elements: USER=%u IP=%r verbose_proctitle: yes first_valid_uid: 100 last_valid_gid: 65534 mail_location: maildir:/home/%u/MailDir maildir_copy_with_hardlinks: yes maildir_copy_preserve_filename: yes mail_executable: /usr/dovecot/libexec/dovecot/imap mail_plugins: convert mail_plugin_dir: /usr/dovecot/lib/dovecot/imap imap_client_workarounds: netscape-eoh tb-extra-mailbox-sep auth default: verbose: yes passdb: driver: pam args: dovecot userdb: driver: passwd plugin: convert_mail: mbox:~/:INBOX=/var/spool/mail/%u convert_skip_broken_mailboxes: no
But this setup gives
service dovecot start Starting IMAP-Service (dovecot 1.0.rc31)Eopen(/.temp.seymour.elsner.lan.5894.59e ab08fc33e142b) failed: Permission denied Error: imap dump-capability process returned 89 [FAILED]
Any pointer to overcome this problem welcome.
Regards ______________________________________________________________ Frank Elsner / c/o Technische Universitaet Berlin | ____________/ tubIT [BD], Sekr. E-N 50 | | Einsteinufer 17 | | Phone: +49 30 314 23897 D-10587 Berlin | | eMail: Frank.Elsner@TU-Berlin.DE Germany __________________| |_________________________________________________________| in dubio pro exim
Sorry to answer my own question.
On Sun, 8 Apr 2007 22:36:05 +0200 Frank Elsner wrote:
[ ... ]
plugin: convert_mail: mbox:~/:INBOX=/var/spool/mail/%u convert_skip_broken_mailboxes: no
After changing this to
convert_mail = mbox:/home/%u:INBOX=/var/spool/mail/%u ^^^^^^^^ Because currently UW-IMAP is in use
convert_skip_broken_mailboxes = yes
...
service dovecot start Starting IMAP-Service (dovecot 1.0.rc31)Eopen(/.temp.seymour.elsner.lan.5894.59e ab08fc33e142b) failed: Permission denied Error: imap dump-capability process returned 89 [FAILED]#
The above error disappeared and now the log shows:
Apr 8 23:13:36 seymour dovecot: imap-login: Login: USER=migrant, [192.168.28.53] Apr 8 23:13:36 seymour dovecot: IMAP(migrant): Loading modules from directory: /usr/dovecot/lib/dovecot/imap Apr 8 23:13:36 seymour dovecot: IMAP(migrant): Module loaded: /usr/dovecot/lib/dovecot/imap/lib20_convert_plugin.so Apr 8 23:13:36 seymour dovecot: IMAP(migrant): Effective uid=1988, gid=100, home=/home/migrant Apr 8 23:13:36 seymour dovecot: IMAP(migrant): mbox: data=/home/migrant:INBOX=/var/spool/mail/migrant Apr 8 23:13:36 seymour dovecot: IMAP(migrant): mbox: root=/home/migrant, index=/home/migrant, inbox=/var/spool/mail/migrant Apr 8 23:13:36 seymour dovecot: IMAP(migrant): mbox: data=/home/migrant:INBOX=/var/spool/mail/migrant Apr 8 23:13:36 seymour dovecot: IMAP(migrant): mbox: root=/home/migrant, index=/home/migrant, inbox=/var/spool/mail/migrant Apr 8 23:13:36 seymour dovecot: IMAP(migrant): maildir: data=/home/migrant/MailDir Apr 8 23:13:36 seymour dovecot: IMAP(migrant): maildir: root=/home/migrant/MailDir, index=/home/migrant/MailDir, control=, inbox= Apr 8 23:13:36 seymour dovecot: IMAP(migrant): Mailbox conversion: Couldn't create mailbox directory .gnome2_private Apr 8 23:13:36 seymour dovecot: child 9905 (imap) returned error 89
--Frank Elsner
On Sun, 2007-04-08 at 23:26 +0200, Frank Elsner wrote:
Apr 8 23:13:36 seymour dovecot: IMAP(migrant): Mailbox conversion: Couldn't create mailbox directory .gnome2_private
Maildir uses "." as hierarchy separator, so this filename is invalid. I'm not sure if convert_skip_broken_mailboxes=yes should just cause these to be ignored, but for now it doesn't..
On Tue, 10 Apr 2007 17:06:02 +0300 Timo Sirainen wrote:
On Sun, 2007-04-08 at 23:26 +0200, Frank Elsner wrote:
Apr 8 23:13:36 seymour dovecot: IMAP(migrant): Mailbox conversion: Couldn't create mailbox directory .gnome2_private
Maildir uses "." as hierarchy separator, so this filename is invalid. I'm not sure if convert_skip_broken_mailboxes=yes should just cause these to be ignored, but for now it doesn't..
Could this behaviour be changed?
I guess it's not a rare case for installations with UW-IMAP and would make the switch to dovecot much more attractive :-)
Regards, Frank Elsner
On Tue, 10 Apr 2007 16:15:21 +0200 Frank Elsner wrote:
On Tue, 10 Apr 2007 17:06:02 +0300 Timo Sirainen wrote:
On Sun, 2007-04-08 at 23:26 +0200, Frank Elsner wrote:
Apr 8 23:13:36 seymour dovecot: IMAP(migrant): Mailbox conversion: Couldn't create mailbox directory .gnome2_private
Maildir uses "." as hierarchy separator, so this filename is invalid. I'm not sure if convert_skip_broken_mailboxes=yes should just cause these to be ignored, but for now it doesn't..
Could this behaviour be changed?
I guess it's not a rare case for installations with UW-IMAP and would make the switch to dovecot much more attractive :-)
And please let me add that the example in "dovecot-1.0.rc31/doc/wiki/Plugins.Convert.txt" reads
| UW-IMAP conversion | ------------------ | | If your mailboxes exist in home directory among other files, you'll need to | use: | | plugin { | convert_mail = mbox:~/:INBOX=/var/mail/%u | convert_skip_broken_mailboxes=yes
Currently this doesn't work :-(
--Frank
On Tue, 2007-04-10 at 16:15 +0200, Frank Elsner wrote:
On Tue, 10 Apr 2007 17:06:02 +0300 Timo Sirainen wrote:
On Sun, 2007-04-08 at 23:26 +0200, Frank Elsner wrote:
Apr 8 23:13:36 seymour dovecot: IMAP(migrant): Mailbox conversion: Couldn't create mailbox directory .gnome2_private
Maildir uses "." as hierarchy separator, so this filename is invalid. I'm not sure if convert_skip_broken_mailboxes=yes should just cause these to be ignored, but for now it doesn't..
Could this behaviour be changed?
Won't do anything to v1.0. Maybe for v1.0.1. Anyway already implemented to CVS HEAD (which will become v1.1):
# Skip directories beginning with '.' #convert_skip_dotdirs = no # If source storage has mailbox names with destination storage's hierarchy # separators, replace them with this character. #convert_alt_hierarchy_char = _
The alt hierarchy character would fix the mailbox names to work, and skipping dotdirs would make that unnecessary.
| plugin { | convert_mail = mbox:~/:INBOX=/var/mail/%u | convert_skip_broken_mailboxes=yes
Currently this doesn't work :-(
You mean it doesn't work because you have these dot-directories? It would work if you didn't have them..
On Tue, 10 Apr 2007 17:39:14 +0300 Timo Sirainen wrote:
On Tue, 2007-04-10 at 16:15 +0200, Frank Elsner wrote:
On Tue, 10 Apr 2007 17:06:02 +0300 Timo Sirainen wrote:
On Sun, 2007-04-08 at 23:26 +0200, Frank Elsner wrote:
Apr 8 23:13:36 seymour dovecot: IMAP(migrant): Mailbox conversion: Couldn't create mailbox directory .gnome2_private
Maildir uses "." as hierarchy separator, so this filename is invalid. I'm not sure if convert_skip_broken_mailboxes=yes should just cause these to be ignored, but for now it doesn't..
Could this behaviour be changed?
Won't do anything to v1.0. Maybe for v1.0.1. Anyway already implemented to CVS HEAD (which will become v1.1):
Thanks. I'll give it a try.
[ ... ]
| plugin { | convert_mail = mbox:~/:INBOX=/var/mail/%u | convert_skip_broken_mailboxes=yes
Currently this doesn't work :-(
You mean it doesn't work because you have these dot-directories? It would work if you didn't have them..
Tell this to the ".gnome*" and similiar people :-)
--Frank
On Tue, 2007-04-10 at 17:06 +0300, Timo Sirainen wrote:
On Sun, 2007-04-08 at 23:26 +0200, Frank Elsner wrote:
Apr 8 23:13:36 seymour dovecot: IMAP(migrant): Mailbox conversion: Couldn't create mailbox directory .gnome2_private
Maildir uses "." as hierarchy separator, so this filename is invalid. I'm not sure if convert_skip_broken_mailboxes=yes should just cause these to be ignored, but for now it doesn't..
Just spotted the above error message (deleted previous posts already), and it strikes me as seriously odd.
Dots in mbox file names are usually embedded (as in "dovecot.org"), where it makes sense, as opposed to beginning with a dot. Even worse, this particular name is kind of weird for a mail folder...
However, this name is well known to me:
[guenther@monkey ~]$ ls -ld .gnome2_private drwx------ 2 guenther users 4096 Jul 21 2005 .gnome2_private/
I'd check where the Maildir data actually is being created and what files are being attempted to convert. Almost looks like the Maildir dirs are being created in the users $HOME...
guenther
-- char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4"; main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1: (c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}
On Tue, 10 Apr 2007 17:58:03 +0200 guenther wrote:
On Tue, 2007-04-10 at 17:06 +0300, Timo Sirainen wrote:
On Sun, 2007-04-08 at 23:26 +0200, Frank Elsner wrote:
Apr 8 23:13:36 seymour dovecot: IMAP(migrant): Mailbox conversion: Couldn't create mailbox directory .gnome2_private
Maildir uses "." as hierarchy separator, so this filename is invalid. I'm not sure if convert_skip_broken_mailboxes=yes should just cause these to be ignored, but for now it doesn't..
Just spotted the above error message (deleted previous posts already), and it strikes me as seriously odd.
Dots in mbox file names are usually embedded (as in "dovecot.org"), where it makes sense, as opposed to beginning with a dot. Even worse, this particular name is kind of weird for a mail folder...
However, this name is well known to me:
[guenther@monkey ~]$ ls -ld .gnome2_private drwx------ 2 guenther users 4096 Jul 21 2005 .gnome2_private/
Me Too :-)
I'd check where the Maildir data actually is being created and what files are being attempted to convert. Almost looks like the Maildir dirs are being created in the users $HOME...
No, dovecot.conf contains
mail_location = maildir:/home/%u/MailDir
...
convert_mail = mbox:/home/%u:INBOX=/var/spool/mail/%u
convert_skip_broken_mailboxes = yes
--Frank Elsner
On Wed, 2007-04-11 at 08:57 +0200, Frank Elsner wrote:
On Tue, 10 Apr 2007 17:58:03 +0200 guenther wrote:
On Tue, 2007-04-10 at 17:06 +0300, Timo Sirainen wrote:
On Sun, 2007-04-08 at 23:26 +0200, Frank Elsner wrote:
Apr 8 23:13:36 seymour dovecot: IMAP(migrant): Mailbox conversion: Couldn't create mailbox directory .gnome2_private
Maildir uses "." as hierarchy separator, so this filename is invalid. I'm not sure if convert_skip_broken_mailboxes=yes should just cause these to be ignored, but for now it doesn't..
Just spotted the above error message (deleted previous posts already), and it strikes me as seriously odd.
Dots in mbox file names are usually embedded (as in "dovecot.org"), where it makes sense, as opposed to beginning with a dot. Even worse, this particular name is kind of weird for a mail folder...
However, this name is well known to me:
[guenther@monkey ~]$ ls -ld .gnome2_private drwx------ 2 guenther users 4096 Jul 21 2005 .gnome2_private/
Me Too :-)
Hmm, so one of your users really got a mail folder named gnome2_private? Odd...
Anyway, another idea hit me -- is this really an invalid name, as Timo said? I don't know the convert plugin and what it logs, and I don't know the exact details of Maildir either. However, creating a mail folder named "gnome2_private" in your MUA will result in a dir by that name with a leading dot. Just like the name in the error message, no?
I'd check where the Maildir data actually is being created and what files are being attempted to convert. Almost looks like the Maildir dirs are being created in the users $HOME...
No, dovecot.conf contains
I did not want you to paste the settings again, but to check if the Maildir files are being created where you expect them. Grepping or changing conf files doesn't mean anything, if the running process doesn't use this particular version. ;)
guenther
-- char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4"; main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1: (c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}
On Wed, 11 Apr 2007 23:10:53 +0200 guenther wrote:
On Wed, 2007-04-11 at 08:57 +0200, Frank Elsner wrote:
On Tue, 10 Apr 2007 17:58:03 +0200 guenther wrote:
On Tue, 2007-04-10 at 17:06 +0300, Timo Sirainen wrote:
On Sun, 2007-04-08 at 23:26 +0200, Frank Elsner wrote:
Apr 8 23:13:36 seymour dovecot: IMAP(migrant): Mailbox conversion: Couldn't create mailbox directory .gnome2_private
Maildir uses "." as hierarchy separator, so this filename is invalid. I'm not sure if convert_skip_broken_mailboxes=yes should just cause these to be ignored, but for now it doesn't..
Just spotted the above error message (deleted previous posts already), and it strikes me as seriously odd.
Dots in mbox file names are usually embedded (as in "dovecot.org"), where it makes sense, as opposed to beginning with a dot. Even worse, this particular name is kind of weird for a mail folder...
However, this name is well known to me:
[guenther@monkey ~]$ ls -ld .gnome2_private drwx------ 2 guenther users 4096 Jul 21 2005 .gnome2_private/
Me Too :-)
Hmm, so one of your users really got a mail folder named gnome2_private? Odd...
No, of course. It's one of the dot files, which nearly each application creates.
Anyway, another idea hit me -- is this really an invalid name, as Timo said? I don't know the convert plugin and what it logs, and I don't know the exact details of Maildir either. However, creating a mail folder named "gnome2_private" in your MUA will result in a dir by that name with a leading dot. Just like the name in the error message, no?
Valid name or not, that's not the primary question.
What abot the idea to ignore directories and check the contents of files for beeing am mail folder? If yes, then comes the question about the name.
I'd check where the Maildir data actually is being created and what files are being attempted to convert. Almost looks like the Maildir dirs are being created in the users $HOME...
No, dovecot.conf contains
I did not want you to paste the settings again, but to check if the Maildir files are being created where you expect them. Grepping or changing conf files doesn't mean anything, if the running process doesn't use this particular version. ;)
The "Maildir" directory was created, but no folder converted. BTW: Thanks for explaining trivia. :-)
--Frank Elsner
guenther
-- char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4"; main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1: (c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}
participants (4)
-
Frank Elsner
-
guenther
-
Sylvain Nemtua
-
Timo Sirainen