Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: steve288 on April 13, 2009, 05:27:36 PM

Title: Changing subject of spam .... again
Post by: steve288 on April 13, 2009, 05:27:36 PM
Several months ago I asked about changing the subject of spam from the default to something else.

Here is my post.
http://forums.contribs.org/index.php/topic,43401

There were two solutions provided. One involved changing  a file by hand.

One first method was as follows.
---------------------------------------

Changing the Default ***SPAM*** to [SPAM]
 
1. Go to /usr/share/qpsmtpd/plugins
2. make a cp of spamassassin file just in case you wreck something. e.g.
cp spamassassin spamassassin.old

3. Open the file using a text editor. eg vi spamassassin

4. Look near the bottom of the file for these lines.

my $subject = $transaction->header->get('Subject') || '';
$transaction->header->replace('Subject', "***SPAM*** $subject");

5. Now carfully replace the words ***SPAM*** with what ever you like. We use [SPAM].

6. Save it.

7. I never know which of the these command Im suppose to do So I do both of them.

signal-event email-update ; svc -t /service/qpsmtpd

However this method was somewhat chritisized because it involved changing actual files.


The second method was the recomended method of chaning this file using db command.
-------------------------------------
db configuration setprop spamassassin Subject "[SPAM]" SubjectTag enabled

signal-event email-modify


But unfortunetely it was discovered that this method doesnt work. Then someone started a bug report
eg. Here..
http://bugs.contribs.org/show_bug.cgi?id=5031

At the time then, I followed the first method for changing ***SPAM*** to [SPAM] by changing the file by hand.

Recently I updated a whole bunch of files on the SME 7.3 and the spam setting has slipped back to ***SPAM***. I would prefer to change it back to the [SPAM] title the "right" way. But it appears that this problem has not been fixed yet. 
The last message on the bug report is from Feb 25 2009.

Can anyone confirm this. Will I have to use the first method again and possibly risk losing it again?

One of the reasons why this is imporant to us is that we forward our mail through SME to an exchange server, but we have spam filters by third party companies and they see *** as a special character and it throws things off. I know that [ ] could also be a regular expression, but not in the case of this software. Frankly I'm not the email administrator, I deal with the sme computer. So all I can do in this case is try to meet the needs of the email admin and change the subject of spam back to [SPAM]

Thanks.
Title: Re: Changing subject of spam .... again
Post by: mercyh on April 14, 2009, 05:51:03 PM
I think Jonathan, AKA Cactus is working on the code for the permanent fix. As there have been no attachments to the bug for testing I presume this is still in development stage.

I believe you will need to do the manual change again and unfortunately if that file comes down as an update it will be set back to the old setting.

Title: Re: Changing subject of spam .... again
Post by: CharlieBrady on April 14, 2009, 05:59:23 PM
One of the reasons why this is imporant to us is that we forward our mail through SME to an exchange server, but we have spam filters by third party companies and they see *** as a special character and it throws things off.

If this is important to your company, you should offer money to a contractor to produce a custom qpsmtpd plugin which does exactly what you want.
Title: Re: Changing subject of spam .... again
Post by: steve288 on April 15, 2009, 03:37:02 PM
Great thank you.

SS.