[Dovecot] Convert plugin

Egbert Jan van den Bussche egbert at vandenbussche.nl
Fri Oct 15 21:54:04 EEST 2010


Op 15-10-2010 20:15, Donny Brooks schreef:
> On 10/15/2010 1:10 PM, Timo Sirainen wrote:
>> On Wed, 2010-10-06 at 22:01 +0200, Egbert Jan van den Bussche wrote:
>>> I'm trying the example from the wiki:
>>>
>>> plugin {
>>> convert_mail = mbox:~/mail:INBOX=/var/mail/%n
>>> }
>>>
>>> but have still not succeded.
>> Did you figure it out already? The problem is that you have no ~/mail/
>> directory, convert plugin doesn't then do anything because it thinks the
>> mails are already converted. Either you need to create those dirs, or
>> maybe it's easier to just use one of the scripts and do all the users at
>> once some weekend.
>>
>>
> Be sure your mail in /home/username is stored in mail and not Mail.
> Otherwise change the ~/mail to ~/Mail and it will work. This is what
> mine was. Also check the /var/mail/%n portion. Mine was stored in
> /var/spool/mail/%n.
>
> Donny B.

Thanks Timo and Donny.

Still not figured out how to make this happen in a reliable way. But I'm 
learning every day...

This probably means that I have to build a temporary /home/user/mail/ 
structure for about 500+ users to satisfy the convert plugin. Maybe a 
fake mailstore file with just one message in that directory. The bulk 
mail is then still the file in /var/mail/<username>. Alternatively I 
could just move the big file from /var/mail/ to ~/mail. (Probably with 
the name 'ínbox'?).

On the new system home dir expands to:
/var/vmail/<domain>/<user>
and the mail dir is:
/var/vmail/<domain>/<user/Maildir/>
The old mail would them be in /var/vmail/<domain>/<user>/mail/

These remote users on the old mail system were supposed to use pop3 ONLY 
but some of them found out about imap... and we had the service running. 
So their mail just kept growing in the file /var/mail/username. Because 
they are not system users pur-sang they have no real /home/username/mail 
directory at all. All they could do was fetch their mail with pop3; no 
local store with fancy folder structure.

When convert runs, under which user is it? root? vmail (virt. users have 
all vmail:vmail) I suppose since it is after login (which is root by 
default IIRC) has run?

TNX
Egbert Jan




More information about the dovecot mailing list