All pastes #205218 Raw Edit

rgsteele

public text v1 · immutable
#205218 ·published 2006-10-16 17:23 UTC
rendered paste body
First, a small preamble to the question:

I'm using FuzzyOCR version 2.3 RC1.
My OS is Debian Sarge (3.1)

And, now the question:

I have the following line in my FuzzyOcr.cf:

focr_scansets $gocr -i -, pnmnorm 2>$errfile | pnmquant 3 2>>$errfile | 
pnmnorm 2>>$errfile | $gocr -l 180 -d 2 -i -, $gocr -l 180 -d 2 -i -

Checking FuzzyOcr.pm, I see that $errfile is declared as:

my ( $errfile, $efilepath ) = Mail::SpamAssassin::Util::secure_tmpfile();

I'm relatively sure that Mail::SpamAssassin::Util::secure_tmpfile(); 
writes to /tmp, but I have a question regarding how the plugin was 
coded. It's not apparently clear to me how FuzzyOcr deals with the 
tmpfiles...does it write to /tmp while it does it's work, and then 
delete the file from /tmp, so that no manual clearing is necessary?  If 
so, where does the actual error logfile reside?  Possibly wherever the 
logfile was designated, e.g.:

focr_logfile /etc/mail/spamassassin/FuzzyOcr.log

Also, I have created the file /etc/mail/spamassassin/FuzzyOcr.log and 
specified it in FuzzyOcr.cf as described in the above line.  However, 
nothing ever seems to write to this file.  It's been chmod'ed to 666, 
since many users have a procmailrc that calls SpamAssassin, and there 
are DROPPRIVS directives in some of these procmailrc files.  I see in 
/var/log/mail.log that FuzzyOcr is being utilized; for example, this 
came out of the log:

Oct 16 12:39:31 node-2 spamd[18805]: spamd: result: Y 32 - 
BAYES_50,EXTRA_MPART_TYPE,FUZZY_OCR,HTML_50_60,HTML_IMAGE_ONLY_28,HTML_MESSAGE 
scantime=8.0,size=20430,user=identityremoved,uid=511,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=33799,mid=<48610130.20061016114502@dca.net>,bayes=0.468177127490346,autolearn=no

Any ideas?