Skip to content

SpamAssassin plugin to extract URI's from QR codes embedded in attached image files

License

Notifications You must be signed in to change notification settings

mxguardian/Mail-SpamAssassin-Plugin-QRCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME

Mail::SpamAssassin::Plugin::QRCode

DESCRIPTION

SpamAssassin plugin to extract URI's from QR codes embedded in image attachments. URI's are added to the URI detail list with the type 'qrcode'. You can use the 'uri_detail' rule to match on these URI's.

SYNOPSIS

loadplugin Mail::SpamAssassin::Plugin::QRCode

ifplugin Mail::SpamAssassin::Plugin::QRCode
  qr_code_min_width     100
  qr_code_max_width     0
  qr_code_min_height    100
  qr_code_max_height    0
  qr_code_scan_pdf      0
endif

uri_detail      HAS_QRCODE_URI   type =~ /^qrcode$/
describe        HAS_QRCODE_URI   Message contains a URI embedded in a QR code

CONFIGURATION

  • qrcode_min_width (default: 100)

    Minimum width of the image in pixels. Images smaller than this will be skipped.

  • qrcode_max_width (default: 0 (no limit))

    Maximum width of the image in pixels. Images larger than this will be skipped.

  • qrcode_min_height (default: 100)

    Minimum height of the image in pixels. Images smaller than this will be skipped.

  • qrcode_max_height (default: 0 (no limit))

    Maximum height of the image in pixels. Images larger than this will be skipped.

  • qrcode_scan_pdf (default: 0)

    Scan PDF attachments for QR codes. If you enable this, make sure you have Ghostscript 9.24 or later installed because of a security vulnerability in earlier versions. Also, you need to enable the policy in ImageMagick's policy.xml file to allow reading PDF files. See the documentation for details.

REQUIREMENTS

This plugin requires the following Perl modules:

  • Mail::SpamAssassin (version 4.0.1 or later)
  • Barcode::ZBar
  • Image::Magick

AUTHORS

Kent Oyer [email protected]

Portions borrowed from Email::Barcode::Decode by Jozef Kutej

COPYRIGHT AND LICENSE

Copyright (C) 2024 MXGuardian LLC

This is free software; you can redistribute it and/or modify it under the terms of the Apache License 2.0. See the LICENSE file included with this distribution for more information.

This plugin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

About

SpamAssassin plugin to extract URI's from QR codes embedded in attached image files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published