09 Sep 2010
Support Center
»
Knowledgebase
»
Custom SMTP reject strings for Qmail
Custom SMTP reject strings for Qmail
Solution
This article would explain how to use Qmail patched with custom SMTP reject patch and MPP reject templates.
Requirements:
1) Qmail patched with Custom SMTP Reject patch from
http://shupp.org/patches/custom.patch
2) MPP 4.11.0 or higher
Using of this MPP feature would assume existence of Qmail patched. After installing latest MPP binaries, one should use
<qmail_use_custom_reject>yes</qmail_use_custom_reject>
Â
Set action "reject" for events of choice: spam_action / on_infection / on_unthorized_* / on_malformed / on_rbl_violation / access_list_on_*_violation / blacklist_on_violation / on_error /
The following custom template options are available:
smtp_rejection_tpl
- Â Â Â Â Â Â Â Template for mandatory part of SMTP/LMTP rejection text. Mandatory part
       will appear right after 550 response code from server. The template could
       contain the following macros that will be replaced with corresponding
       values at runtime:
           %INTERNALID%
               Internal ID of the message. This is to search in MPP logs
               for transaction flow.
           %GROUP%
               MPP group that was used to scan the message.
           %STATE%
               Substituted with comma-separated list of scan states.
               Full list is the following:
                   virus,spam,harass,unauth,error,max_recursion,max_size,acl,
                   encrypted,malformed,bl,rbl
           %VIRUSLIST%
               Substituted with comma-separated list of found viruses.
           %SPAMSCORE%
               Spam score for the message as returned by a scanner.
           %SPAMLEVEL%
               Spam level for the message. This could be "low", "medium" or "high"
               or empty string.
            %RBLSITES%
             List all RBL/DNSBL sites that have been hit.
            Â
NOTE:
This macro is available since MPP 4.13.0.
           %HARASSSCORE%
               Harass score for the message.
       Value: string
       Default: "Message rejected: processed as %INTERNALID%."
smtp_rejection_tpl_if_virus
- Â Â Â Â Â Â Â Template for conditional part that will appear only if corresponding condition is met.
       Conditional part will appear after mandatory part (separated with space from
       it and from other conditional parts).
       Value: string
       Default: "Infected with %VIRUSLIST%."
smtp_rejection_if_spam
- Template for conditional part that will appear only if corresponding condition is met.
       Conditional part will appear after mandatory part (separated with space from
       it and from other conditional parts).
       Value: string
       Default: "%SPAMLEVEL% level spam."
smtp_rejection_if_harass
- Â Â Â Â Â Â Template for conditional part that will appear only if corresponding condition is met.
       Conditional part will appear after mandatory part (separated with space from
       it and from other conditional parts).
       Value: string
       Default: "Harassment language."
NOTE: This option is available for historical reasons, but it will never be used as there are no harass hits with antispam engines.
smtp_rejection_if_unauthorized
- Â Â Â Â Â Â Template for conditional part that will appear only if corresponding condition is met.
       Conditional part will appear after mandatory part (separated with space from
       it and from other conditional parts).
       Value: string
       Default: "Unauthorized content."
smtp_rejection_tpl_if_error - Â Â Â Â Â Â Template for conditional part that will appear only if corresponding condition is met.
       Conditional part will appear after mandatory part (separated with space from
       it and from other conditional parts).
       Value: string
       Default: "Processing error."
smtp_rejection_if_max_recursion
- Â Â Â Â Template for conditional part that will appear only if corresponding condition is met.
       Conditional part will appear after mandatory part (separated with space from
       it and from other conditional parts).
smtp_rejection_tpl_if_max_size
- Template for conditional part that will appear only if corresponding condition is met.
       Conditional part will appear after mandatory part (separated with space from
       it and from other conditional parts).
       Value: string
       Default: "Maximum message size exceeded."
smtp_rejection_tpl_if_acl
- Â Template for conditional part that will appear only if corresponding condition is met.
       Conditional part will appear after mandatory part (separated with space from
       it and from other conditional parts).
       Value: string
       Default: "ACL violation."
smtp_rejection_tpl_if_encrypted
 -  Template for conditional part that will appear only if corresponding condition is met.
       Conditional part will appear after mandatory part (separated with space from
       it and from other conditional parts).
       Value: string
       Default: "Encrypted."
smtp_rejection_tpl_if_malformed
- Template for conditional part that will appear only if corresponding condition is met.
       Conditional part will appear after mandatory part (separated with space from
       it and from other conditional parts).
       Value: string
       Default: "Malformed"
smtp_rejection_tpl_if_bl
- Template for conditional part that will appear only if corresponding condition is met.
       Conditional part will appear after mandatory part (separated with space from
       it and from other conditional parts).
       Value: string
       Default: "Blacklisted."
smtp_rejection_tpl_if_rbl
- Template for conditional part that will appear only if corresponding condition is met.
       Conditional part will appear after mandatory part (separated with space from
       it and from other conditional parts).
       Value: string
       Default: "RBL violation."
smtp_rejection_tpl_if_spf
- Â Â Â Â Â Â Template for conditional part that will appear only if corresponding condition is met.
       Conditional part will appear after mandatory part (separated with space from
       it and from other conditional parts).
       Value: string
       Default: "SPF %SPFRESULT% condition."
smtp_rejection_tpl_if_greylist -
       Template for conditional part that will appear only if corresponding condition is met.
       Conditional part will appear after mandatory part (separated with space from
       it and from other conditional parts).
       Value: string
       Default: "Geylisted - try again later."
smtp_rejection_tpl_if_spam_trap
- Template for conditional part that will appear only if corresponding condition is met.
       Conditional part will appear after mandatory part (separated with space from
       it and from other conditional parts).
       Value: string
       Default: "Spam trap is hit."
Article Details
Article ID:
51
Created On:
30 Apr 2009 06:12 PM
This answer was helpful
This answer was not helpful
User Comments
Add a Comment
Sharing is good. So if you have a comment about this entry please feel free to share. The Comments might be reviewed by our Staff and might require approval before being posted. Questions posted will not be answered, please submit a ticket for support requests.
Fullname:
Email: (Optional)
Comments:
Back
Login
[Lost Password]
Email:
Password:
Remember Me:
Search
-- Entire Support Site --
Knowledgebase
Downloads
Article Options
Add Comment
Print Article
PDF Version
Email Article
Add to Favorites
Home
|
Register
|
Submit a Ticket
|
Knowledgebase
|
Downloads
Language:
English (U.S.)