> -----Original Message----- > From: Mark [mailto:[EMAIL PROTECTED] > Sent: Monday, July 21, 2003 11:26 AM > To: Dallas L. Engelken; [EMAIL PROTECTED] > Subject: Re: [SAtalk] Is spamc unbuffered? > > [snip] > > Thank you very much for your outstanding reply! The size > parameter was exactly what solved it. :) >
glad to help. > > are you doing this to keep it in memory and prevent disk writes? > > Yes, I am. :) Since I already hold the entire message in a > variable when I call spamc, I did not want to write it out > again to disk, just so spamc could suck it in with a "<" > redirection. Hence the Open2 call. > i figured so.. since i've done the exact same thing :) > > you should probably define a limit on the max file size you > will pass > > to spamc, and then check $length against that size, and if it's > > larger, skip it. either that or recode the way spamc handles it's > > STDIN. > > That is true too: I probably should not even bother to check > when it exceeds the -s size. > maybe you mis-worded that?? ... what you want to do is define a constant... ie ($MAXBYTES=256000;), and compare it to the length of $text if ($length < $MAXBYTES) { # call spamc } else { # skip spamc } i pass -s $length and not -s $MAXBYTES to my spamc call so my STDIN buffer size changes depending on msg size, this saves a little bit of additional overhead. dallas ------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk