using external scanners in leafnode2
Cory Albrecht <cory@...
2008-03-26 21:53:02 GMT
Glad to see there's still some life to leafnode. I couldn't satisfy my
addiction to Usenet without it. (OK, well, I could, but it wouldn't be
Anyways, recently I've been thinking how nice it would be to be able to
scan all new messages with SpamAssassin or other tools commonly used to
scan email. Especially with all the crap that emerges from that haven of
spammers known as Google Groups. :-P
Many of these tools, like spamc for SpamAssassin work with stdin and
sometimes stdout and as such should be relatively easy to integrate.
Quickly looking over the leafenode2 source code, I had initially thought
that the way to patch things would be to modify readfilter() in
filterutil.c and struct filterentry in leafnode.h to allow adding new
actions to the filters file. However, while trying to follow through
store_stream() in store.c, it seems that store_stream is made to split
out the header and then run the filters on just the header and then use
that split off copy of the header to figure out final file
locations/links, xref/xover data and so forth.
I had hoped that this would be an easy patch, but is not to be. To me,
the filters file seems to be the logical place users would specify
scanners like SpamAssassin or ClamAV, but things are just not ideal for
adding a filter that would necessarily modify the post in the process.
Are there any suggestions as to why I might do to make a patches that
would stand a chance of getting added to leafnode2? Scanning my incoming