/[smeserver]/rpms/qpsmtpd/sme7/qpsmtpd-48d1a5b9febc96d2d3c4110500759e36fb4eabb6.patch
ViewVC logotype

Annotation of /rpms/qpsmtpd/sme7/qpsmtpd-48d1a5b9febc96d2d3c4110500759e36fb4eabb6.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Thu Nov 5 18:18:12 2009 UTC (14 years, 7 months ago) by snetram
Branch: MAIN
CVS Tags: qpsmtpd-0_83-0_7_el4_sme, qpsmtpd-0_83-0_9_el4_sme, qpsmtpd-0_83-0_8_el4_sme, qpsmtpd-0_83-0_10_el4_sme, qpsmtpd-0_83-0_6_el4_sme, HEAD
* Thu Nov 5 2009 <smeserver-contribs@snetram.nl> 0.83-0.6.sme
- Apply qpsmtpd git changesets to implement custom SPAM
  subject prefix [SME: 5567]

1 snetram 1.1 commit 48d1a5b9febc96d2d3c4110500759e36fb4eabb6
2     Author: Jonathan Martens <jonathan@snetram.nl>
3     Date: Wed Nov 4 11:10:38 2009 +0100
4    
5     Custom spam tag subject munging in spamassasin plugin
6    
7     Hi all!
8    
9     I have written a patch to allow the spamassasin plugin to have a custom
10     spam tag read in from a configuration file as opposed to the default ***
11     SPAM *** that is hard coded.
12    
13     When the configuration file (spamsubjectprefix) is not defined or empty
14     the default value still applies, if it is provided the value from the
15     configuration file is used.
16    
17     Any change this can be considered for implementation as we would really
18     like to have it for SME Server.
19    
20     Kind regards,
21    
22     Jonathan
23    
24     Signed-off-by: Robert <rspier@pobox.com>
25    
26     diff --git a/plugins/spamassassin b/plugins/spamassassin
27     index 1a1b4b1..be3a67b 100644
28     --- a/plugins/spamassassin
29     +++ b/plugins/spamassassin
30     @@ -41,7 +41,8 @@ The default is to never reject mail based on the SpamAssassin score.
31     =item munge_subject_threshold [threshold]
32    
33     Set the threshold where the plugin will prefix the subject with
34     -'***SPAM***'. A modified subject is easier to filter on than the
35     +'***SPAM***' or the value defined in the spamsubjectprefix
36     +configuration file. A modified subject is easier to filter on than the
37     other headers for many people with not so clever mail clients. You
38     might want to make another plugin that does this on a per user basis.
39    
40     @@ -236,8 +237,9 @@ sub check_spam_munge_subject {
41    
42     return DECLINED unless $score >= $self->{_args}->{munge_subject_threshold};
43    
44     + my $subject_prefix = $self->qp->config('spamsubjectprefix') || '*** SPAM ***';
45     my $subject = $transaction->header->get('Subject') || '';
46     - $transaction->header->replace('Subject', "***SPAM*** $subject");
47     + $transaction->header->replace('Subject', "$subject_prefix $subject");
48    
49     return DECLINED;
50     }

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed