Hello. I need to know how I can get the final message file name inside a plugin like the zlib 2.0 plugin. I saw another threads about zlib plugin, but don't see no one asking about this. 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. As the size flags will not correspond to the effective message size/vsize, then I could change the flags using the filename too, right? This is my first approach. But... There are another way to do this directly on message been received by the plugin, like pre-allocating the size/vsize flags? 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. Thank's Everybody _________________________________________________________________ O seu navegador tamb?m te ajuda a ficar longe de v?rus. Leia mais sobre seguran?a. http://www.microsoft.com/brasil/windows/internet-explorer/?WT.mc_id=1500
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.