MailEnable Enterprise Guide
Message Filtering / Scripted Filtering / Overview / Literal values
In This Topic
    Literal values
    In This Topic

    The following table lists the literal values which can be used in a script.

    Token

    Value

    [ME_SPAM_PROBABILITY]

    Contains a numeric value of the calculated Bayesian probability of a message being detected as spam.

    [ME_SIZE]

    The size of the message in bytes

    [ME_SENDERAUTH]

    Indicates whether the sender of the message authenticated in order to dispatch the message to MailEnable. The value is 1 if the sender authenticated, otherwise the value is 0.

    [ME_HASVIRUS]

    Indicates whether the message contained a virus. The value is 1 if the message contained a virus, otherwise the value is 0. When a virus is detected by filter criteria it is automatically removed from the message.

    [ME_HASANATTACHMENT]

    Indicates whether the message has an attachment. The value is 1 if the message has an attachment, otherwise the value is 0.

    Literal enumeration example

    Copy Code
    If ([ME_SENDERAUTH] = 0) Then
     'sender has not authenticated
    End If
    

    Extra literal values are also available for substitution. These are formatted differently because they are not evaluated as the filter is being executed, but read from the command file for the message being processed.

    Token

    Value

    %IPADDRESS%

    The TCP/IP address of the originating message

    %POSTOFFICE%

    The post office that can reasonably be assigned to the message.

    %SENDER%

    The sender of the message in internal format of [CONNECTOR:Address]. E.g. [SMTP:xjz@mailenable.com]

    %SENDERADDRESS% The sender email address in the format xjz@mailenable.com.

    %RECIPIENTS%

    The recipient(s) of the message in internal format of [CONNECTOR:Address];[CONNECTOR:Address2]. E.g. [SMTP:xjz@mailenable.com];[SMTP:def@mailenable.com]

    %SUBJECT%

    The subject of the message.

     

    More Examples

    Check whether the subject of a message contains the letters ABC

    Copy Code
    If InStr(1,UCase("%SUBJECT%"),"ABC") > 0 then
       FilterResult=1
    End If
    

    Check if the Subject of the message contains "Re" at the start of it

    Copy Code
    If Left("%SUBJECT%",2) = "Re" then
       FilterResult=1
    End If