[Dovecot] Convert plugin

Daniel Luttermann daniel at dlutt.de
Fri Jul 30 15:45:58 EEST 2010

Egbert wrote on 30.07.2010:

> Op 30-7-2010 0:07, Daniel Luttermann schreef:
>> Egbert wrote on 29.07.2010:
>>> Hi,
>>> I'm trying to convert users from a sendmail server to a postfix/dovecot
>>> server. All works fine but one of the last things is to rescue the
>>> messages in /var/mail/<user>  on the old server. This seems very
>>> straitforward using the convert plugin but with the settings from the
>>> wiki, nothing happens when the user logs in. Do I need a private
>>> namespace for this as suggested elsewhere in the wiki?
>> No hint in the logfile? Maybe a permission problem or Dovecot can't
>> find any emails? If nothing is logged maybe it helps when you set
>> "mail_debug=yes" in dovecot.conf?
>> Btw: it seems that in the upcoming Dovecot 2.0 version there's no
>> convert plugin available anymore - with 2.0 you can use "dsync" to
>> convert emails between different mailbox formats.
>> --
>> Daniel

> Yeah, the obvious place to look. There I found out that the plugin looks
> for a direcory in /var/mail/ called <user> and in that directory a 
> mailfile called 'inbox' is expected.
> So I have now the convert in imap and pop3 chapters of dovecot.conf and
> enabled the plugin in the plugin section:

> protocol imap {
>    mail_plugins = convert
> }
> protocol pop3 {
>    mail_plugins = convert
> }
> plugin {
>    convert_mail = mbox:/var/mail/%u
> }

> So things finally start to work. Only the rename of the /var/mail/<user>
> directory doesn't work yet. Wrong owner. I made /var/mail owned by 
> vmail:vmail but that is not good. Maybe it should be owned by dovecot.
> Who is the owner of the convert process?

> EJ

I think that vmail should be the correct user/group for this but it
could be a problem if the source and destination directories are the
same (home directory is the same as mail_location).

Have you set a different mail location? I think Dovecot can't rename
the old directory if the new mail location is in the same directory.


More information about the dovecot mailing list