Using Rules.SMTPDebug
About rules.SMTPDebug
rules.SMTPDebug is a place for the administrator to add custom mail rules that won't be replaced during an upgrade. This document is mainly intended for temporary rules to aid SMTP debugging efforts using the new per-connection logging variables, but it is not limited to that.
All mail rules may be used in this document, and rules in this document are executed before rules in the rules.MailRules document.
The debug logging levels can be set for:
Rule |
Variable |
Purpose |
SMTP Server |
$SMTPServerLogging |
sets the same debugging level as the SMTP server buttons on the Logging tab. |
Mail decoding |
$MailDecodingLogging |
sets the same debugging level as the Mail decoding buttons on the Logging tab. |
MIME decoding |
$MIMEDecodingLogging |
sets the same debugging level as the MIME decoding buttons on the Logging tab. |
Using rules.SMTPDebug
Example 1
# Log the complete SMTP message when the sender's IP is 123.123.123.123
^: IF ($SenderIP == 123.123.123.123) SET $SMTPServerLogging = 5
Example 2
# Log the complete SMTP message, and turn on MIME and message decode logging when the Subject is "This is a test message from Susan".
# Note that mail headers received before the Subject: header will not be logged.
Subject: IF ($Subject == "This is a test message from Susan" SET $SMTPServerLogging = 5 AND $MailDecodingLogging = 5 and $MIMEDecodingLogging = 5
For more information
|