[Dovecot] plugin problem

Lars Stavholm stava at telcotec.se
Sat Sep 29 18:23:03 EEST 2007


Let's try to keep this on the list, shall we.

Fábio M. Catunda wrote:
> Lars Stavholm escreveu:
>> Question:
>> How can I retrieve the full unix path for a specific mail?
>>   
> I am trying the same thing, but I have a different idea.
> 
> I want that when the user moves a message the transaction is logged into
> a file, then I can right external programs that will read this file and
> control dspam.

Have a look at Johannes Berg's reply above: the Maildir format
would have a file for each mail message, other formats would not.

> My idea is based on the following:
> Q: Scalability: And if a user moves 400 messages to Spam folder at once?
> A: Well, its not a problem to write 400 lines into a file, then the
> external program will control how much resources dspam can use to
> classify all those messages.

Sounds OK, not really a problem.

> Q: Why not a FIFO:
> A: In case of a crash I need to classify all messages anyway, so, a FIFO
> is not a good idea here. (I think so)

Didn't quite understand the reasoning there,
but never mind, it's just me:)

> Q: And if the user moves a message from Spam folder to trash folder,
> will it be considered innocent?
> A: Thats a big problem. When a message is deleted by a MUA its usually
> copied from one folder to another and then deleted, but there is no
> default trash folder in imap, so, you have to be able to configure a lot
> of "possible trash folders" to ignore then, thats why I prefer to have a
> external program controlling dspam.

I don't see this as a problem at all (why create one when there's
none to be found:):

* Move message into Spam: it's a spam that should be reclassified.
* Move message out of Spam: it's a ham that should be reclassified.

  Don't really care where the mail comes from or where it is moved.
  This is the beauty of it all, count the key or mouse clicks, can't
  be less than this:)

* Using the expire plugin, the Spam folder will be emptied auto-
  matically in due time (typically 30 days maybe) without user
  intervention.

All close to zero maintenance for sysadmin as well as end-user.

> Well, by now I dont have much, but I really would like to know how to
> find the filename of a message being copied from a folder to another.

No such luck (I think): to my understanding (with the help of
Johannes in previous reply in this thread), you'd have to create
a temporary file with the mail message using tmpnam() +
mail_get_stream() or similar, and then do your thing.

I'm aiming towards that exact functionality: I want to be able
to do training using "pristine" source (so I'll need the whole
message), and keep the previous functionality using signatures.
We'll see how it goes.

Good Luck and thanks for your input
/Lars



More information about the dovecot mailing list