Philip, after rewriting sa-exim
(
http://marc.merlins.org/linux/exim/files/local_scan.c )
I found that a few things were missing from the API you gave:
1) read/use return_text on 2xx
I'd like to be able to return
200 Accepted, SA score is 4.0, below threshold of 8.0
or
200 This is confirmed spam, feeding to the bit bucket
2) optional LOCAL_SCAN_REJECT without triggering a full dump of the rejected
headers so that I can return a different message in return_text than what
I log
3) I need to return '\n' in return_text for multiline messages, but it gets
logged, and log_write isn't supposed to get newlines... See #2
If you could consider these for a future version of exim, that'd be great.
Also, some details on the string_sprintf and copy functions would be nice If
you look at my code, I attempted to read values from a config file and store
them in the function's local variables.
The problem is that after the function returned, memory that I got from the
stor e got redistributed and corrupted, so the next time local_scan was
called, some of my static variables got corrupted.
I was convinced that memory was allocated and left alone until the exim
process died. Apparently, exim puts in back in the pool as soon as
local_scan returns.
This is unexpected, I pulled my hair for several hours tried to find out
what was going on. Documenting that behavior would be cool.
Thanks,
Marc
--
Microsoft is to operating systems & security ....
.... what McDonalds is to gourmet cooking
Home page:
http://marc.merlins.org/ | Finger marc_f@??? for PGP key