Koozali.org: home of the SME Server

How to delete automatically messages tagged as Spam

volipind

How to delete automatically messages tagged as Spam
« on: August 25, 2004, 10:20:29 AM »
Hi,i have succesfully installed spamassassin on my box and it works great;it recognizes messages from spammers and tags them with [Spam],there is a way to delete these messages without receiving in my outlook?

SteveB

Re: How to delete automatically messages tagged as Spam
« Reply #1 on: August 25, 2004, 12:09:28 PM »
Quote from: "volipind"
a way to delete these messages without receiving in my outlook?


Edit your .procmailrc file and add the following

# -------------------------------------------------------------------------
# Mails with a score of 15 or higher are almost certainly spam (with 0.05%
# false positives according to rules/STATISTICS.txt). Let's put them in a
# different mbox or simply delete them. (This one is optional.)
# --------------------------------------------------------------------------
:0
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
/dev/null

and/or

# -------------------------------------------------------------------------
# All mail tagged as spam (eg. with a score higher than the set threshold)
# is moved to the junkmail folder
# -------------------------------------------------------------------------
:0
* ^X-Spam-Status: Yes
$MAILDIR/;junkmail/

Regards,

Steve

Offline Knuddi

  • *
  • 540
  • +0/-0
    • http://www.scanmailx.com
How to delete automatically messages tagged as Spam
« Reply #2 on: August 25, 2004, 01:06:44 PM »
You could also install the SpamFilter RPM that allows you to configure this. Please notice that it uses SpamAssassin V3 which is still RC1 and not final release. I have used this for weeks now without any problems but you ought to know.

http://sme.swerts-knudsen.dk/howtos/howto_29.htm

Rgds,
Jesper Knudsen

volipind

Re:Re: How to delete
« Reply #3 on: August 25, 2004, 01:07:29 PM »
.procmailrc file <- where is located ? tnx

SteveB

Re:Re: How to delete
« Reply #4 on: August 25, 2004, 01:55:12 PM »
Quote from: "volipind"
.procmailrc file <- where is located ? tnx


Browse to /home/e-smith/files/users/***** where ***** is the user you wish to modify. In this folder you will find a .procmailrc file, edit this file using your preferred text editor, I use the one in WINSCP but avoid using Notepad in Windows as it can cause problems.

Note that:

/dev/null = deleted

$MAILDIR/;junkmail/ = place in "junkmail" folder in your mail directory.

If you are happy that Spamassassin is working well enough for you then /dev/null should be fine. If you are worried about false positives use the junkmail option and check the junkmail folder occasionally.

Michiel

How to delete automatically messages tagged as Spam
« Reply #5 on: August 25, 2004, 02:11:42 PM »
Editing .procmailrc is not a good idea as it will be regenerated by the SME templating system and thus deleting your carefully crafted rules.

Install user-panel (http://dungog.net/sme/files/userpanel/) and edit your procmail rules from there.

Regards,
Michiel

volipind

Re:Re: How to delete
« Reply #6 on: August 25, 2004, 03:01:54 PM »
here's my procmail conf
(not still working!! why??)

#------------------------------------------------------------
# DO NOT MODIFY THIS FILE! It is updated automatically by the
# SME Server software. Instead, modify the source template in
# an /etc/e-smith/templates-custom directory. For more
# information, see http://www.e-smith.org/custom/
#
# copyright (C) 1999-2003 Mitel Networks Corporation
#------------------------------------------------------------

# ---------------------------------------
# Default Shell, Program & file locations
# SME SpamFiler
# ---------------------------------------
SHELL=/bin/bash
DEFAULT=$HOME/Maildir/
FORMAIL=/usr/bin/formail
MAILDIR=$HOME/Maildir/
PMDIR=$HOME
SENDMAIL=/usr/sbin/sendmail


# ------------
# some logging
# ------------
VERBOSE=no
LOGFILE=$HOME/procmail.log




# -------------------------------------------------------------------------
# Mails with a score of 15 or higher are almost certainly spam (with 0.05%
# false positives according to rules/STATISTICS.txt).
# Configured by SME-SpamFilter from sme.swerts-knudsen.dk
# --------------------------------------------------------------------------
:0
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
/dev/null




# --------------------------
# all else goes to the inbox
# --------------------------
:0
$DEFAULT

SteveB

Re:Re: How to delete
« Reply #7 on: August 25, 2004, 03:31:02 PM »
Quote from: "volipind"
here's my procmail conf
(not still working!! why??)


* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
Will only act on "# Mails with a score of 15 or higher"

* ^X-Spam-Status: Yes
Will act on all emails which Spamassassin has identified as spam.

So to delete all emails that Spamassassin has identified as spam change your rule to

:0
* ^X-Spam-Status: Yes
/dev/null

Offline crazybob

  • *****
  • 894
  • +0/-0
    • Stalzer R&D
How to delete automatically messages tagged as Spam
« Reply #8 on: August 25, 2004, 04:26:35 PM »
I use the email filter from dungog, and it takes care of it for me.

Bob
If you think you know whats going on, you obviously have no idea whats going on!

volipind

How to delete automatically messages tagged as Spam
« Reply #9 on: August 25, 2004, 06:39:46 PM »
i m now using http://dungog.net/sme/files/userpanel/ and it seems works very well.tnx all for precious suggestions.