[Dovecot] delete messages after sa-learn

Andrzej Adam Filip anfi at onet.eu
Fri May 28 14:45:33 EEST 2010


Florian Effenberger <floeff at gmail.com> wrote:
> Hi Andrzej,
>
> 2010/5/28 Andrzej Adam Filip <anfi at onet.eu>:
>
>> Have you considered fetching from dovecot (maildir) to mbox file and
>> learning from mbox file?
>> a) fetchmail CAN use .../dovecot/imap wrapper script in "plugin" option
>>   to read maildir directly  [set environment variable MAIL to
>>   maildir:~/Maildir in the wrapper]
>> b) fetchmail CAN use procmail in "mda" option to deliver directly to mbox
>
> does fetching to mbox file bring any advantage? It seems that learning
> out of maildir and rm'ing afterwards works like a charm, so I guess
> fetchmail would bring more overhead?

It will bring more overhead but "some people" value portable solutions.
Some people try to avoid locking THEMSELVES into 
a) specific format of IMAP folder
   As I understand dovecot "recommends" switching from maildir to dbox
b) specific software (specific IMAP server)
   I do not plan to change dovecot but I do like to keep my options open.

Anyway:  instead of scanning all and deleting files in maildir (race
risk) you may consider moving files to another file directory/folder 
(on the same file-system) and learn from it.
You may ask Timo How to lock maildir message/file before 
"moving it out"/"deleting it" by non dovecot software :-)

-- 
[pl>en: Andrew] Andrzej Adam Filip : anfi at onet.eu
Never tell people how to do things.  Tell them WHAT to do and they will
surprise you with their ingenuity.
  -- Gen. George S. Patton, Jr.


More information about the dovecot mailing list