Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: skovsgaard on March 17, 2006, 12:16:00 PM

Title: Automatically delete old junkmail?
Post by: skovsgaard on March 17, 2006, 12:16:00 PM
The Spamassassin config is just perfect. So effective I see my users junkmail folders slowly filling up. Is there a plugin or something I have to enable to auto delete old junk, like the feature in Jespers Spam filter configuration for 60. It would be a pain cleaning out manually (100 users) :-( -- Or is it a feature of the future :-)

Thanks in advance
Title: Automatically delete old junkmail?
Post by: byte on March 17, 2006, 04:57:26 PM
I'm sure I saw this in the Bug Tracker that Charlie added a delete junk mail after 90days...You may wish to search the Bug Tracker for more info...
Title: Automatically delete old junkmail?
Post by: skovsgaard on March 18, 2006, 01:17:24 PM
Great - Thanks byte

Found it http://bugs.contribs.org/show_bug.cgi?id=666 and this way I see the subject has been discussed before http://forums.contribs.org/index.php?topic=30535.msg127932#msg127932.

Now I just had to find a way to modify the 90 days retention time  8-)
Code: [Select]
my $age = $sa->prop('MessageRetentionTime') || '0';
Title: Automatically delete old junkmail?
Post by: byte on March 18, 2006, 01:56:34 PM
Quote from: "skovsgaard"
Now I just had to find a way to modify the 90 days retention time  8-)
Code: [Select]
my $age = $sa->prop('MessageRetentionTime') || '0';


There's your clue so just do...

db configuration setprop spamassassin MessageRetentionTime 60

Where 60 is the value you want, then do...

signal-event email-update

And that's it
Title: Automatically delete old junkmail?
Post by: skovsgaard on March 18, 2006, 04:14:18 PM
You saved my day - Thank you   :-)
Title: Automatically delete old junkmail?
Post by: dmajwool on July 10, 2006, 12:24:26 PM
Quote
db configuration setprop spamassassin MessageRetentionTime 60

Where 60 is the value you want, then do...

signal-event email-update


After that, how can I interrogate what value is in this key?

I tried
Code: [Select]
db configuration show spamassassin MessageRetentionTime

and
Code: [Select]
db configuration getprop spamassassin MessageRetentionTime
and
Code: [Select]
db configuration print spamassassin MessageRetentionTime


Thanks, David.
Title: Automatically delete old junkmail?
Post by: uniqsys on July 10, 2006, 07:20:41 PM
Quote

After that, how can I interrogate what value is in this key?


I am not an expert but I believe the correct format to view service parameters is to type as root:

  config show servicename

So in your case it would be:

  config show spamassassin

You should get output similar to this:

spamassassin=service
    DNSAvailable=yes
    MessageRetentionTime=90
    OkLanguages=all
    OkLocales=all
    RejectLevel=0
    ReportSafe=0
    Sensitivity=medium
    SkipRBLChecks=0
    SortSpam=enabled
    Subject=[SPAM]
    SubjectTag=enabled
    TagLevel=5
    UseBayes=0
    status=enabled

Notice the default MessageRetentionTime as 90 days.
Title: Automatically delete old junkmail?
Post by: dmajwool on July 10, 2006, 08:14:16 PM
I'm afraid I made another mistake.


Code: [Select]
db configuration getprop spamassassin MessageRetentionTime
Does return the value of the key if the spelling "spamassassin" is written correctly.:hammer:

Sorry for creating confusion.

David.