You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by alex k <xe...@mailinglist.at> on 2009/05/23 12:43:15 UTC

New spamassassin OCR plugin

Hi,
It seems that image spam is back. So I wrote a new OCR plugin for
spamassassin, which uses convert and ocrad to extract text.
For details and download see:

http://spielwiese.la-evento.com/facileOCR/

We use this plugin on our servers. It kicks out every image-spam, that
made it through the other filters and produces not a single false
positive.

OK, this is kind of promotion ;)
Nevertheless I hope it is helpful.

bye,
Xela


Re: New spamassassin OCR plugin

Posted by Benny Pedersen <me...@junc.org>.
On Wed, May 27, 2009 23:43, decoder wrote:
> I am planning a new release, but my time schedule is though.

super, i posted a new thread with subject "FuzzyOcr wordlist"

new words to be added for latest spams

-- 
http://localhost/ 100% uptime and 100% mirrored :)


Re: New spamassassin OCR plugin

Posted by decoder <de...@own-hero.net>.
alex k wrote:
>
> If only FuzzyOCR's developer would read that ;)
> Unfortunately he doesn't seem to be interested in his project anymore.
> Maybe you could take care of this orphaned code.
>
>   

Dear Alex,


I am reading exactly everything you write ;)


The code is not orphaned, but also not being extended at the moment. The 
SVN version runs stable in all SA 3.2.x releases. I answer to tickets 
and questions via email.


I am planning a new release, but my time schedule is though.


Best regards,


Chris

Re: New spamassassin OCR plugin

Posted by mouss <mo...@ml.netoyen.net>.
alex k a écrit :
> Hi,
> 
>> On Sun, May 24, 2009 at 08:57:28AM +0200, alex k wrote:
>>> It is Linux centric and I do mention that on the project side.
>>>
>>> The code part you mention is the one that kills a leftover convert
>>> process
>>> after it reached its timeout, an exeption.
>>> You got the sources, go ahead and make a windows version.
>> You seem you think "ps" works the same on every Unix variant. What does
>> Windows have to do with it? I'm not here to nitpick, but it's pretty
>> serious
>> if processes go crazy and fill up the server. You just mention that it's
>> "tested" on Linux. Most people would assume that SA plugins run fine as
>> long
>> as you have SA and Perl.
> 
> You forgot ocrad. Ocrad is needed by facileOCR (see "Dependencies") and as
> far as I know, there is no ready-to-use binary for Windows.
> 


# uname
FreeBSD
# cd /usr/ports/graphics/ocrad
# make install clean
...
$ pkg_info|grep ocrad
ocrad-0.17_3        OCR program implemented as filter

As you see, it took one command to install ocrad.

now:

$ ps -o pid,cmd --ppid $$ --no-header
ps: cmd: keyword not found
ps: illegal option -- -
usage: ps [-aCcefHhjlmrSTuvwXxZ] [-O fmt | -o fmt] [-G gid[,gid...]]
          [-M core] [-N system]
          [-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]
       ps [-L]



> OK, to make it clear. To all Windows users: use any of the other plugins
> available for Windows, there are several. You will not be able to fulfill
> the requirements.
> 
> And again, you got the sources, adapt it to your needs.
> I'm afraid, this discussion is leading nowhere.
> 

good luck.

Re: New spamassassin OCR plugin

Posted by Res <re...@ausics.net>.
On Sun, 24 May 2009, LuKreme wrote:

> On 24-May-2009, at 03:10, alex k wrote:
>> You forgot ocrad. Ocrad is needed by facileOCR (see "Dependencies") and as
>> far as I know, there is no ready-to-use binary for Windows.
>
> You keep talking about Windows.  The world is not bifurcated between windows 
> and Linux, there is Solaris, OS X, FreeBSD, and countless other -nonlinux- 
> unix variants out there.

I thought he said it was for Linux?  That kinda means if it works on 
BSD/Slowaris goodo, if not, dont cry, the guy is trying to do something 
worthwhile and all I see here is a bunch of misfit trolls attacking him
for it, ask yourself this,  WTF are *YOU* doing to contribute to the
community to stop the crap?  A few of you need to ask yourselves that!

Now, get over it, move on with life, that means fighting the 
spammers not each other.


--
Res

-Beware of programmers who carry screwdrivers

Re: New spamassassin OCR plugin

Posted by LuKreme <kr...@kreme.com>.
On 24-May-2009, at 03:10, alex k wrote:
> You forgot ocrad. Ocrad is needed by facileOCR (see "Dependencies")  
> and as
> far as I know, there is no ready-to-use binary for Windows.

You keep talking about Windows.  The world is not bifurcated between  
windows and Linux, there is Solaris, OS X, FreeBSD, and countless  
other -nonlinux- unix variants out there.


-- 
Once again I am banished to the demon section of the card catalog


Re: New spamassassin OCR plugin

Posted by alex k <xe...@mailinglist.at>.
Hi,

> On Sun, May 24, 2009 at 08:57:28AM +0200, alex k wrote:
>>
>> It is Linux centric and I do mention that on the project side.
>>
>> The code part you mention is the one that kills a leftover convert
>> process
>> after it reached its timeout, an exeption.
>> You got the sources, go ahead and make a windows version.
>
> You seem you think "ps" works the same on every Unix variant. What does
> Windows have to do with it? I'm not here to nitpick, but it's pretty
> serious
> if processes go crazy and fill up the server. You just mention that it's
> "tested" on Linux. Most people would assume that SA plugins run fine as
> long
> as you have SA and Perl.

You forgot ocrad. Ocrad is needed by facileOCR (see "Dependencies") and as
far as I know, there is no ready-to-use binary for Windows.

OK, to make it clear. To all Windows users: use any of the other plugins
available for Windows, there are several. You will not be able to fulfill
the requirements.

And again, you got the sources, adapt it to your needs.
I'm afraid, this discussion is leading nowhere.

regards,
Xela



Re: New spamassassin OCR plugin

Posted by Henrik K <he...@hege.li>.
On Sun, May 24, 2009 at 08:57:28AM +0200, alex k wrote:
> 
> It is Linux centric and I do mention that on the project side.
>
> The code part you mention is the one that kills a leftover convert process
> after it reached its timeout, an exeption.
> You got the sources, go ahead and make a windows version.

You seem you think "ps" works the same on every Unix variant. What does
Windows have to do with it? I'm not here to nitpick, but it's pretty serious
if processes go crazy and fill up the server. You just mention that it's
"tested" on Linux. Most people would assume that SA plugins run fine as long
as you have SA and Perl.


Re: New spamassassin OCR plugin

Posted by decoder <de...@own-hero.net>.
LuKreme wrote:
> On 24-May-2009, at 18:40, Henrik K wrote:
>> I don't know why users are so afraid of words like SVN. You have to 
>> look at the project, not version numbers.
>
>
> I don't have FuzzyOCR installed, and it's not because of the SVN. 
> First, I don't think my server can take the processing hit and second 
> it requires so much to be installed that I'm SURE my server can't take 
> the hit.
>

May I ask how many mails you process per day? Please note that

a) FuzzyOcr runs last if properly installed
b) it doesn't do anything if the score exceeds a configurable threshold
c) it supports hashes and other things that make processing faster


Cheers,


Chris

Re: New spamassassin OCR plugin

Posted by LuKreme <kr...@kreme.com>.
On 24-May-2009, at 18:40, Henrik K wrote:
> I don't know why users are so afraid of words like SVN. You have to  
> look at the project, not version numbers.


I don't have FuzzyOCR installed, and it's not because of the SVN.   
First, I don't think my server can take the processing hit and second  
it requires so much to be installed that I'm SURE my server can't take  
the hit.

-- 
You may be anti anti-spam-kook if: Despite having invented the
	FUSSP you not only don't know the difference between the SMTP
	envelope and SMTP headers; you doubt there is such a thing as
	the SMTP envelop because email doesn't involve paper.


Re: New spamassassin OCR plugin

Posted by Henrik K <he...@hege.li>.
On Sun, May 24, 2009 at 08:57:28AM +0200, alex k wrote:
> 
> > Looks like nothing that fuzzyOCR couldn't do, being more flexible and
> > proven
> > by time.
> 
> If only FuzzyOCR's developer would read that ;)
> Unfortunately he doesn't seem to be interested in his project anymore.
> Maybe you could take care of this orphaned code.

I don't know why you think it's orphaned. SVN version worked fine 2 years
ago, and it still works. There was not image spam during this time.

http://fuzzyocr.own-hero.net/ticket/2934#comment:3

Even promise of a new official release. I don't know why users are so afraid
of words like SVN. You have to look at the project, not version numbers.


Re: New spamassassin OCR plugin

Posted by alex k <xe...@mailinglist.at>.
Hi,

> On Sat, May 23, 2009 at 12:43:15PM +0200, alex k wrote:
>> Hi,
>> It seems that image spam is back. So I wrote a new OCR plugin for
>> spamassassin, which uses convert and ocrad to extract text.
>> For details and download see:
>>
>> http://spielwiese.la-evento.com/facileOCR/
>>
>> We use this plugin on our servers. It kicks out every image-spam, that
>> made it through the other filters and produces not a single false
>> positive.
>>
>> OK, this is kind of promotion ;)
>> Nevertheless I hope it is helpful.
>
> You should mention that it's pretty Linux centric, atleast code like
> "ps -o pid,cmd --ppid $$ --no-header".. why don't you use perl functions?
>

It is Linux centric and I do mention that on the project side.
The code part you mention is the one that kills a leftover convert process
after it reached its timeout, an exeption.
You got the sources, go ahead and make a windows version.

> Looks like nothing that fuzzyOCR couldn't do, being more flexible and
> proven
> by time.

If only FuzzyOCR's developer would read that ;)
Unfortunately he doesn't seem to be interested in his project anymore.
Maybe you could take care of this orphaned code.

regards,
Xela
>
>



Re: New spamassassin OCR plugin

Posted by wolfgang <me...@gmx.net>.
Hi Xela,

I think there has been some misunderstanding:

In an older episode (Sunday, 24. May 2009), Henrik K wrote:
> You should mention that it's pretty Linux centric, atleast code like
> "ps -o pid,cmd --ppid $$ --no-header".. why don't you use perl
> functions?

In an older episode (Sunday, 24. May 2009), Henrik K wrote:
> You seem you think "ps" works the same on every Unix variant.

Henrik is trying to point out that the "ps" command has different syntax 
requirements on different Unix variants. I can only confirm that (I use 
Linux and Solaris at work).

So, the point is that the facileOCR.pm code in it's current state does 
not simply require Perl, SA and ocrad, but *also* Linux. And Henrik 
suggests to make that more clear in the documentation.

Best regards,

wolfgang

Re: New spamassassin OCR plugin

Posted by Henrik K <he...@hege.li>.
On Sat, May 23, 2009 at 12:43:15PM +0200, alex k wrote:
> Hi,
> It seems that image spam is back. So I wrote a new OCR plugin for
> spamassassin, which uses convert and ocrad to extract text.
> For details and download see:
> 
> http://spielwiese.la-evento.com/facileOCR/
> 
> We use this plugin on our servers. It kicks out every image-spam, that
> made it through the other filters and produces not a single false
> positive.
> 
> OK, this is kind of promotion ;)
> Nevertheless I hope it is helpful.

You should mention that it's pretty Linux centric, atleast code like
"ps -o pid,cmd --ppid $$ --no-header".. why don't you use perl functions?

Looks like nothing that fuzzyOCR couldn't do, being more flexible and proven
by time.


Re: New spamassassin OCR plugin

Posted by wolfgang <me...@gmx.net>.
In an older episode (Saturday, 23. May 2009), alex k wrote:
> Hi,
> It seems that image spam is back. So I wrote a new OCR plugin for
> spamassassin, which uses convert and ocrad to extract text.

Thank you. It works out of the box (after installing ocrad) here on 
Ubuntu 8.04.2 linux with SA 3.2.4 and Perl 5.8.8.

I miss an option to adjust the score, though. My test got a FOCR score 
of 17 which is far more than I want.

To my surprise, setting a different FOCR score in a *.cf file 
in /etc/mail/spamassassin/ did not change the result.

Regards,

wolfgang



Re: New spamassassin OCR plugin

Posted by alex k <xe...@mailinglist.at>.
Hi,

> On 23.05.09 12:43, alex k wrote:
>> It seems that image spam is back. So I wrote a new OCR plugin for
>> spamassassin, which uses convert and ocrad to extract text.
>> For details and download see:
>>
>> http://spielwiese.la-evento.com/facileOCR/
>>
>> We use this plugin on our servers. It kicks out every image-spam, that
>> made it through the other filters and produces not a single false
>> positive.
>
> hmmm, last two images I've checked were much nicer read by gocr, just FYI.
>
> another question I've raised some time ago was the possibility of pushing
> read text to spamassassin so it could be detected by other checks, e.g.
> spamassassin and optionally uribl's...
> The answer was gocr is not reliable enough for doing this stuff, but I
> hope
> it's worth trying...

I will explain a bit, how this plugin works:
It doesn't matter, how nice the text is read. You can always get the
extracted text from debuglog and expand your spamwords list with things
like "Favorl,cllck,Fvorle".
The extracted text is filtered, so you can savely use anything you find in
debuglog.
Thus we don't need a 100% word recognition, which would be very hard to
reach.

I decided to use ocrad and not gocr, because ocrad has some nice features
(like text filtering and builtin resizing).
I wanted to keep the list of dependencies as small as possible, so I use
only ocrad (tests with tesseract or ocropus were discouraging).

By the way, there already exists a plugin which extracts words with gocr
and feeds it to Bayes. Do you know BayesOCR?

bye,
Xela

> --
> Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
> Warning: I wish NOT to receive e-mail advertising to this address.
> Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
> "To Boot or not to Boot, that's the question." [WD1270 Caviar]
>



Re: New spamassassin OCR plugin

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
On 23.05.09 12:43, alex k wrote:
> It seems that image spam is back. So I wrote a new OCR plugin for
> spamassassin, which uses convert and ocrad to extract text.
> For details and download see:
> 
> http://spielwiese.la-evento.com/facileOCR/
> 
> We use this plugin on our servers. It kicks out every image-spam, that
> made it through the other filters and produces not a single false
> positive.

hmmm, last two images I've checked were much nicer read by gocr, just FYI.

another question I've raised some time ago was the possibility of pushing
read text to spamassassin so it could be detected by other checks, e.g.
spamassassin and optionally uribl's...
The answer was gocr is not reliable enough for doing this stuff, but I hope
it's worth trying...
-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
"To Boot or not to Boot, that's the question." [WD1270 Caviar]