TesseractOcr

TesseractOcr parses text from images within the body of an email and passes any content found back to the parent SpamAssassin process. This allows for the content to be tested against standard SpamAssassin rules.

Testing TesseractOcr is Working

Greylisting must be disabled for the recipient domain before running this test.

To test the TesseractOcr plugin it is necessary to send a test spam image attachment using the commands below (Replacing emailonserver@example.com with a real email account on the server):

Centos / RHEL / CloudLinux:

wget https://docs.danami.com/downloads/viagra.gif
echo "TEST MESSAGE w/ ATTACHMENT" | mail -S smtp=localhost -r sender@example.com -s "Tessaracr OCR example" -a viagra.gif emailonserver@example.com

Debian / Ubuntu:

apt-get install s-nail
wget https://docs.danami.com/downloads/viagra.gif
echo "TEST MESSAGE w/ ATTACHMENT" | mail -S smtp=localhost -r sender@example.com -s "Tessaracr OCR example" -a viagra.gif emailonserver@example.com

Check the mail header on the sent message and if the OCR plugin is working correctly you will see that the X-Spam-Status header matched the DRUGS_ERECTILE rule.

X-Spam-Status: No, score=0.7 required=7.0 tests=ALL_TRUSTED,BAYES_00,
    DRUGS_ERECTILE,SB_GIF_AND_NO_URIS,SPF_PASS,TXREP autolearn=no
    autolearn_force=no version=3.4.3-rc3

Related Pages