User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

reference:spamrules_statement_getsectionmd5 [2018/11/14 10:45] (current)
Line 1: Line 1:
 +======Spam Filter Rules: GetSectionMD5======
 +^Statement ​ |GetSectionMD5 |
 +^Version ​ |2.3.6+ |
 +^Purpose ​ |Performs an MD5 hash on a specified MIME section of the message, and returns the result into the specified variable in hex encoded form |
 +The **GetSectionMD5** statement requires a message section number and variable name, in the format
 +  GetSectionMD5 <message section number> <​variable name>
 +  ​
 +The following example will get the contents of the first section of the message, perform an MD5 hash on it, and put the result into the **${myMD5Hash}** variable
 +GetSectionMD5 1 myMD5Hash
 +Using **GetSectionMD5** with [[spamrules_statement_foreach|ForEach MimeSection]]
 +ForEach MimeSection SectionInfo
 + ​IfMatch ${SectionInfo} "/​^(\d+):​([\d\. ]*):​(.*?​):​(\d+):​(\d+):​(.*)$/"​
 +  ${SectionId} = ${1}
 +  GetSectionMD5 ${SectionId} myMD5Hash
 + EndIf
reference/spamrules_statement_getsectionmd5.txt ยท Last modified: 2018/11/14 10:45 (external edit)