Spam Filter Rules: ZipCount

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

The ZipCount statement requires a message section number and variable name, in the format

ZipCount <message section number> <variable name>

Example

The following example will iterate through the MIME sections and get the ZIP file content count into a variable ${zipcount}

ForEach MimeSection SectionInfo
 IfMatch ${SectionInfo} "/^(\d+):([\d\. ]*):([^:]*)/"
  ${SectionId} = ${1}
  ${SectionType} = ${3}
  If ${SectionType} == "application/zip"
   ZipCount ${SectionId} zipcount
  EndIf
 EndIf
EndForEach