At 06/10/2002 10:43, Derrick 'dman' Hudson wrote: >| Looking at the source for spamc, it looks to me like a message that >| exceeds the maximum message size is simply skipped entirely, which >| actually requires reading in most of the message first - fair >| enough, as it's hard to determine the size when it's coming from a >| pipe. > >If your mail system allows it, you could even bypass spamc entirely >for large messages. That saves the overhead of a fork(), exec() and >all the read()s and write()s and counting on the pipes. Some systems >(eg exim, maildrop) already know the size of a message, which makes >that easy.
That's not what I want to do (though it is in fact what I'm doing). What I want to do is have spamc just process the first Xk bytes of the message. I could probably hack together some procmail crap to get the same effect, but it's not worth that kinda kludgework. >| However, wouldn't it make some sense to try passing at least >| the first max_size bytes of the message to spamd for processing? > >Well, the idea is that spammers aren't sending large messsages. If >the message is that large, you have already determined it isn't spam >(merely based on size). Not true. We're starting to see spam mail with huge attachments. >| This could also be of some benefit to performance - set a small >| message size limit (say 50k) to limit memory use and processing >| time, but still get the benefits of spam scanning those largish >| messages. > >That does sound like a good idea, though. You can use your MTA to >limit the processing of over-large messages and spamc can limit >spamd's processing to just the first nK of not-quite-as-large >messages. In addition, spamc could simply output the modified headers >(Subject:, X-Spam-*, maybe Content-Type:) and reduce the output on the >pipe. (Marc's local_scan() only reads the headers from that side of >the pipe and only pays attention to some of them anyways) Actually, I think this answers my question - spamc would have to do some internal message parsing to separate headers and body for something like this scheme to work. Thanks! Pete `-_-' Although we modern persons tend to take our electric lights, radios, mixers, etc., for granted, hundreds of years ago people did not have any of these things, which is just as well because there was no place to plug them in. Then along came the first Electrical Pioneer, Benjamin Franklin, who flew a kite in a lighting storm and received a serious electrical shock. This proved that lighting was powered by the same force as carpets, but it also damaged Franklin's brain so severely that he started speaking only in incomprehensible maxims, such as "A penny saved is a penny earned." Eventually he had to be given a job running the post office. -- Dave Barry, "What is Electricity?" _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk