Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[SRX] How to enable the custom tag in the mail header when e-mail is detected as spam

0

0

Article ID: KB27119 KB Last Updated: 19 Mar 2013Version: 1.0
Summary:
This article provides information on how to enable the custom tag in the mail header, when e-mail is detected as spam.
Symptoms:

When tag-header is correctly configured, the tag will be displayed in the mail header:

Received: from test.com ([1.1.1.1]) by test2.com with Microsoft SMTPSVC(6.0.3790.4675);
Tue, 14 Sep 2013 10:19:35 -0700
MySpamHeader: is_spam > Inserted tag
From: "user1" <user1@test.com>
To: "user2" <user2@test2.com>
Subject: Test AS tag-header
Tue, 14 Sep 2013 10:19:40 -0700  
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0021_01CB53F6.7B365690"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
Return-Path: user1@test.com
Message-ID: <UTM-WIN2iIOCT4o1Y4y00000002@test.com>
However, if only tag-header is configured:
root@SRX-UTM> show configuration security utm
feature-profile {
    anti-spam {
        address-blacklist black_list;
        sbl {
            profile as-profile {
                spam-action tag-header; < tag-header is configured
            }
        }
    }
}
utm-policy custom-utm-policy {
    anti-spam {
        smtp-profile junos-as-defaults;
    }
}
root@SRX-UTM>
The result is as follows:
Received: from test.com ([1.1.1.1]) by test2.com with Microsoft SMTPSVC(6.0.3790.4675);
Tue, 14 Sep 2013 10:19:35 -0700   <=== No tag inserted
From: "user1" <user1@test.com>
To: "user2" <user2@test2.com>
Subject: Test AS tag-header
Tue, 14 Sep 2013 10:19:40 -0700  
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0021_01CB53F6.7B365690"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
Return-Path: user1@test.com
Message-ID: <UTM-WIN2iIOCT4o1Y4y00000002@test.com>
No tag is added in the mail header. What is the correct configuration to use tag-header? Is this an issue?
Cause:

This is not a bug. the default string of tag-header" / "tag-subject is ***SPAM*** . The feature inserts the tag in the mail header. However, the default string is not a vaild header format. The header tag string must have a colon (:); for example, MySpamHeader: is_spam.

Otherwise the whole mail will be invalid and cause issues. So, for the tag-header option, if the custom string does not a colon in it, it will just be ignored.

The following message is noticed in utm traceoption:

Jan 11 00:44:15 00:44:15.798109:CID-0:RT:custom header tag is invalid

This is only for the tag-header and not for tag-subject.

Solution:

For the tag-header spam action, the custom string should be specified in the "<tag name>:<custome message>" format, as illustrated below, before the default or custom message:

root@SRX-UTM> show configuration security utm
feature-profile {
    anti-spam {
        address-blacklist black_list;
        sbl {
            profile as-profile {
                spam-action tag-header;
                custom-tag-string "MySpamHeader: is_spam";   < custom-tag-string contains ":"
            }
        }
    }
}
utm-policy custom-utm-policy {
    anti-spam {
        smtp-profile junos-as-defaults;
    }
}
root@SRX-UTM>

The user can customize *<tag name> and define the *<custom message>.

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search