[exim] calling external filter and conditionally resuming de…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Esad Hajdarevic
Dátum:  
Címzett: exim-users
Tárgy: [exim] calling external filter and conditionally resuming delivery
I'm try to achieve the following behaviour:

Right now I'm using IMAP server and I'd like to "comment" some messages,
that is to
add some text to the message (edit the message). I've found that the
best way to this, independent
of the MUA is simply to forward this message with the added comment to
the very same mail address/mailbox.

However, this new e-mail (comment+original) mail should replace the old
mail (original).

Of course, this is out of the scope of MTA, and I have a simple ruby
script that upon
execution parses the STDIN looking for a message, logs into IMAP
account, checks if the forwarded message is there and
replaces it with the new message. If no message is found to be replaced,
it terminates with some exit code.

I'd like to call this script, pass every incoming e-mail message to it,
and stop processing if the message was "recognized",
or pass the processing if it was unrecognized.

What is the best and easiest way to do this?

I'm using dovecot_transport and exim 4.

Greetings,

Esad