reference:spamrules_assignments

You can assign values to variables using the syntax

${variable} = value | ${variable}

The spam filter rules support the following assignment operators:

= | Specify the value of the variable to equal the value after the assignment operator |
---|---|

+= | Add the numeric value after the assignment operator to the current numeric value of the variable |

-= | Subtract the numeric value after the assignment operator from the current numeric value of the variable |

*= | Multiply the current numeric value of the variable by the numeric value after the assignment operator |

/= | Divide the current numeric value of the variable by the numeric value after the assignment operator |

.= | Concatenate the text after the assignment operator onto the current value of the variable |

- There must be a space on each side of the assignment operator
- On the right side of the assignment operator you can specify text or variables.

There are various 'operators' or 'functions' which you can specify on the right side of the assignment operator:

Function name | Description | Version |
---|---|---|

CalcBayes | Makes VPOP3 calculate the statistical probability of the current message being spam based on the current Bayesian database contents. This is returned as a percentage probability between 0 (not spam) and 100 (spam). | 2.1.7+ |

GetDateNow | Returns the current date as the number of days since 1st January 1601 (in UTC time) | 2.2.1+ |

ABS | Returns the absolute value of the following value ${x} = ABS -3 would make ${x} = 3 | 2.2.1+ |

CEIL | Returns the smallest integer value which is greater than or equal to the following value (CEIL 3.1 = 4, CEIL -3.1 = -3) | 2.2.1+ |

FLOOR | Returns the largest integer value which is smaller than or equal to the following value (FLOOR 3.1 = 3, FLOOR -3.1 = -4) | 2.2.1+ |

INT | Returns the following value with any fractional part truncated (INT 3.1 = 3, INT -3.1 = -3) | 2.2.1+ |

LENGTH | Returns the length in characters of the following value (LENGTH “hello” = 5) | 2.3.7+ |

reference/spamrules_assignments.txt · Last modified: 2018/11/14 10:45 (external edit)