I am occupied with the same quest. I believe we should join forces.
I took a look at the submit code (no, I am not used to C++ at all) and I
believe that I found the place to create a hook to pass and receive back
a message to SpamAssassin.
I tried to rewrite a message using a modified version of the perlfilter to see what would happen and, surprise! It worked. But Mr. Sam told me that it was just good luck. I'm not sure why.
I need to understand a bit better submit's code but I believe that closing and reopening the files around the filters calling inside submit, and so updating the filehandles, might solve the problem. Any comments Mr. Sam?
Rodrigo
Well, Mr. Sam can obviously answer this better, but from what he's said before... I don't see how this would help.
The way I understand what he was saying previously, is that Courier keeps a "map" of sorts describing how the message is laid out. If you change the character position of everything (e.g. by inserting characters/lines) you risk corrupting the message if Courier decides to rewrite stuff. Because Courier does so according to its "map" to save itself the trouble of parsing each message multiple times.
See what I mean?
How will closing/reopening cause Courier's internal map of the message to be updated? I don't much think it will.
Now, I haven't actually read the code for myself, so maybe Sam will tell you your idea will work after all... but I doubt it.
AFAICT from what he said before, you'd have to move (or copy) the code that has Courier build its map in the first place. I.e. make it happen after the calls to filters (or let it do it before, but afterwards do it again) so that the map is correct after the message is rewritten.
BUT... I don't know what kind of impact that would have because of any number of factors such as performance effects, stability changes, file locking of the map, etc. As I told someone last night... "Caveat hacker." :)
Nonetheless, I wish you luck. Several people do seem to be interested in this type of thing. So if you can make it work and TEST IT FULLY, and I mean *F-U-L-L-Y* with a wide assortment of header errors, message types, message sizes, attachments included/excluded, single- and double-byte charsets (with and without proper labeling), etc. -- then I think a lot of people will be thankful. But be careful to do that depth-and-breadth of testing before making the claim that it works. ... Good luck!
-jab
------------------------------------------------------- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 _______________________________________________ courier-users mailing list [EMAIL PROTECTED] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users