Hi Jason,

you really should ask these questions on the courier-users mailing list,
so others can either help or benefit from the discussion.

> Next, I need to add a header to the inbound message to indicate whether
> it has passed the auto-whitelist check (something like X-Autowhitelist:
> YES). I can then use the value of this header from a maildrop script and
> decide whether to submit the message to further spam checks.
>
> [...]
> However, when I do this, it seems to corrupt the message text when
> viewed in a mail reader like Mozilla. It also appears to screw-up any
> multi-part mime demarcations.
>
> Is there some safe/approved way to add a header to a message from within
> a filter module?

No.  A courierfilter (which C:F itself is) cannot modify the message due
to internal optimizations of Courier which assume that the message file
isn't modified.  If you modify it anyway, the message gets corrupted.

The latest few releases of Courier add an identifier to the messages'
"Received:" lines which is available in the global filterering
(courierfilter) stage already, and can thus be used to track
to-be-modified messages in the local filtering (maildrop) stage.

A future release of C:F will make it possible to record desired changes
("add a header", "replace a header", "remove a header", ...) for a
message, and a local filtering add-on (to be called from maildrop) then
actually carries out the desired changes.  This release will probably
happen in about 2 months at the earliest.



-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to