User Tools

Site Tools


reference:spamrules_statement_convert

This is an old revision of the document!


Spam Filter Rules: Convert

Statement Convert
Version 2.4.9+
Purpose Allows you to convert data from one form to another

The Convert statement requires a data parameter, conversion method and variable name, in the format

Convert <data> <conversion method> <variable name>

Supported conversion methods

Name Description
Base64 Converts to Base64 encoding
DeBase64 Converts from Base64 encoding - null bytes are changed to spaces
UrlEncode Performs URL query encoding
Upper Converts to upper case
Lower Converts to lower case

Examples

Storing the encoded text in a variable ${encoded} and decoding it back into a variable ${decoded}

Convert "hello" "Base64" encoded

Convert "${encoded}" "DeBase64" decoded
# ${decoded} is now "hello"

Using UrlEncode

Convert "Me & You" "UrlEncode" converted
# ${converted} is now "Me+%26+You"
reference/spamrules_statement_convert.1314177137.txt.gz · Last modified: 2018/11/14 10:44 (external edit)