User Tools

Site Tools


reference:spamrules_statement_getsectionmd5
no way to compare when less than two revisions

Differences

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


Previous revision
reference:spamrules_statement_getsectionmd5 [2018/11/14 10:45] (current) – external edit 127.0.0.1
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>
 +  
 +
 +=====Examples=====
 +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
 +<code>
 +GetSectionMD5 1 myMD5Hash
 +</code>
 +
 +Using **GetSectionMD5** with [[spamrules_statement_foreach|ForEach MimeSection]]
 +<code>
 +ForEach MimeSection SectionInfo
 + IfMatch ${SectionInfo} "/^(\d+):([\d\. ]*):(.*?):(\d+):(\d+):(.*)$/"
 +  ${SectionId} = ${1}
 +  GetSectionMD5 ${SectionId} myMD5Hash
 + EndIf
 +EndFor
 +</code>
reference/spamrules_statement_getsectionmd5.txt · Last modified: 2018/11/14 10:45 by 127.0.0.1