[Dovecot] Plugins and message file access
Timo Sirainen
tss at iki.fi
Wed May 26 19:25:29 EEST 2010
On Mon, 2010-05-03 at 10:52 -0300, Reinaldo Matukuma wrote:
> My interest is to use the message's file name in a specific function that will add some lines on it and, after that, calculate a md5 hash of the modified file.
That's not going to work. Once message is saved to a file, it must not
change in any way. You should rather change the input stream that
Dovecot's internal code sees.
> As the size flags will not correspond to the effective message size/vsize, then I could change the flags using the filename too, right?
And cache file would contain broken data too. And who knows what other
problems.
> I cannot simply to pass the extra text directly on the message being received because I need to do some extra validations over the full content of the message before add my data on the message.
Your plugin could first save the mail to a temporary file, do its stuff,
then send the output to Dovecot.
More information about the dovecot
mailing list