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

 Back
 Login [Lost Password] 
Email:
Password:
Remember Me:
 
 Search
 Article Options
Home | Register | Submit a Ticket | Knowledgebase | Downloads
Language: