----- Original Message -----
From: "Dallas L. Engelken" <[EMAIL PROTECTED]>
To: "Mark" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Monday, July 21, 2003 6:02 PM
Subject: RE: [SAtalk] Is spamc unbuffered?


> > This works flawlessly on not all that large files; but when I tried it
> > on a file over 1M, the whole process hangs at "print WRITER $text;".
> > I know the docs talk about unix buffering and all, but I thought the
> > output of spamc is supposed to be unbuffered?

> actually, 1M is not the level where this would bomb... try a 256k file,
> since spamc runs with -s 256000 if no -s is specified.

> > Does anyone have any idea why it would hang altogether?

> spamd is expecting an EOF to terminate the input from WRITER, but never
> gets it since it's buffer is 256k and you are sending > 256k.

Thank you very much for your outstanding reply! The size parameter was
exactly what solved it. :)

> 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.

> 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.

Thanks again!

- Mark



-------------------------------------------------------
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

Reply via email to