User Tools

Site Tools


Spam Filter Rules: ZipContentsFull

Statement ZipContentsFull
Version 6.7+
Purpose Enables the script to obtain the list of files contained in a ZIP attachment

The ZipContentsFull statement requires a message section number and bag name, in the format

ZipContentFull <message section number> <bag name>
  • This statement is like the ZipContents statement but it also calculates the MD5 hash of the ZIP file content
  • If the message section doesn't contain a ZIP attachment, then the bag will be empty after this statement
  • If the message section does contain a ZIP attachment, then the bag will contain a list of the ZIP file contents in the format: filename<tab>ZIP comment<tab>compressed length<tab>uncompressed length<tab>timestamp<tab>MD5 hash


The following example will iterate through the MIME sections and get the ZIP contents into a bag 'zipcontents'

ForEach MimeSection SectionInfo
 IfMatch ${SectionInfo} "/^(\d+):([\d\. ]*):([^:]*)/"
  ${SectionId} = ${1}
  ${SectionType} = ${3}
  If ${SectionType} == "application/zip"
   ZipContentsFull ${SectionId} zipcontents
reference/spamrules_statement_zipcontentsfull.txt · Last modified: 2018/11/14 10:45 (external edit)