Macro in What Object

Jan 16, 2019
I am trying to add a disclaimer to incoming emails that have a detected "spam URL" in the message body. Is it possible to use macros in the Match Field option in What Objects?

This is what Im trying:
What: Spam URL
Priority: 75

Add disclaimer: SpamAssassin Rule: The mail body contains a URI containing a domain that has
matched an entry on the DNSBL Spamhaus Domain Block List (DBL).....

What: Spam URL
Field: __SPAM_INFO__

I have also tried using this for the What Object
What: Spam URL

From mail.log when sending my test message:
Jan 16 12:50:30 pmg pmg-smtp-filter[2007]: 40BBE5C3F9911BFD60: SA score=2/5 time=4.337 bayes=undefined autolearn=no autolearn_force=no hits=AWL,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_DBL_SPAM

From the header of my test message on my mail server:
X-SPAM-LEVEL: Spam detection results: 2
    AWL -0.250 Adjusted score from AWL reputation of From: address
    DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid
    DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
    DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain
    DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain
    FREEMAIL_ENVFROM_END_DIGIT 0.25 Envelope-from freemail username ends in digit (gmail)
    FREEMAIL_FROM 0.001 Sender email is commonly abused enduser mail provider (gmail)
    HTML_MESSAGE 0.001 HTML included in message
    KAM_NUMSUBJECT 0.5 Subject ends in numbers excluding current years
    RCVD_IN_DNSWL_NONE -0.0001 Sender listed at, no trust
    SPF_PASS -0.001 SPF: sender matches SPF record
    URIBL_DBL_SPAM 2.5 Contains a spam URL listed in the Spamhaus DBL blocklist

I think what I want to do is possible with PMG. Im not sure what Im doing wrong.


The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!