Mail::SpamAssassin::Plugin::AttachmentPresent - SpamAssassin plugin to score mail based on attachments including attachments inside archives.
loadplugin Mail::SpamAssassin::Plugin::AttachmentPresent body RULENAME eval:attachmentpresent_archive_count() body RULENAME eval:attachmentpresent_file_count()
Get information about attached files, including inside archives. Only supports Zip right now.
None
Encode::MIME::Header; Archive::Zip IO::String Mail::SpamAssassin::Plugin::AttachmentPresent
Should already be installed by spamassassin
Typically in local.cf, include lines: loadplugin Mail::SpamAssassin::Plugin::AttachmentPresent
body HAS_JS_FILES eval:attachmentpresent_file_count('js') describe HAS_JS_FILES The e-mail has attached javascript files (or inside archives) score HAS_JS_FILES 0.001
Returns the amount of recognised archive files inside this message. Currently only Zip files are recognised. If the file could not be parsed because it was too big or corrupted, its not counted.
Optionally you can filter on extension, where $ext should be set to the extension to filter on. Eg. $ext='zip'
Returns the amount of files inside this message. It also counts files inside recognised archive files. Currently only Zip files are recognised.
Optionally you can filter on extension, where $ext should be set to the extension to filter on. Eg. $ext='js'
Optionally you can specify the minimum amount of files (of the given type) which will be required to trigger the rule. By default $more_than is 0, so at least one file of the given type is needed, but you can set it to 4 if you want the rule to trigger when at least 5 files are present.
To install Mail::SpamAssassin::Plugin::AttachmentPresent, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::SpamAssassin::Plugin::AttachmentPresent
CPAN shell
perl -MCPAN -e shell install Mail::SpamAssassin::Plugin::AttachmentPresent
For more information on module installation, please visit the detailed CPAN module installation guide.