Alessandro Vesely writes:
Sam,
is it possible that Courier behaves differently
depending on the return code of the filter?
I don't know what should be the preferred return code when a virus is found in a message. I currently use 554, can't remember why. The idea is to reserve one of the 5xx codes to bear the additional internal meaning that the bounce will contain no attachment. (A more generic approach would be to use return codes not used by SMTP, e.g. "850".)
This is not easy to do. Bounce handling is done separately. If a filter rejects the message the message is only marked as rejected. When message processing begins, since all recipients are marked as nondeliverable, the message gets processed by the courierdsn module, which generates the bounce, and removes the original message from the queue.
That's because the ctlfile doesn't know about the global filter response.
Browsing the source, it seems that only the first digit of the output
is retained. One possibility would be to add a parameter to the various
submit_readrcprint*() - a char or function pointer, that can be NULL
to get the current behaviour.
The difficult thing is adding the info in the ctlfile. It would be nice
to devise a generic one-liner per filter parameter rather than a per
recipient status code. Hence I'd rather put the knowledge that the special
5xx code is for viruses into courieresmtpd and then let the courierdsn
check the parameter.
I'm thinking of a line like
PREFIX + <filtername> + ":" + <data>
and reserve the filter name "courier" for that DSN processing. That way
a future enhancement of the global filter protocol could let filters
tag each message with their own findings. Cool?
Additionally, the sender may request whether or not include the contents of the original message in the bounce, and courierdsn may or may not follow the request, depending on the message.
If it knew it is a viral message, it would be easy to add to dodsn()
a third condition for sending full body as
C) The body contains no viruses.
Ale
------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 _______________________________________________ courier-users mailing list [EMAIL PROTECTED] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
