Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: volipind on August 25, 2004, 10:20:29 AM

Title: How to delete automatically messages tagged as Spam
Post by: volipind 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?
Title: Re: How to delete automatically messages tagged as Spam
Post by: SteveB 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
Title: How to delete automatically messages tagged as Spam
Post by: Knuddi 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
Title: Re:Re: How to delete
Post by: volipind on August 25, 2004, 01:07:29 PM
.procmailrc file <- where is located ? tnx
Title: Re:Re: How to delete
Post by: SteveB 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.
Title: How to delete automatically messages tagged as Spam
Post by: Michiel 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
Title: Re:Re: How to delete
Post by: volipind 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
Title: Re:Re: How to delete
Post by: SteveB 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
Title: How to delete automatically messages tagged as Spam
Post by: crazybob on August 25, 2004, 04:26:35 PM
I use the email filter from dungog, and it takes care of it for me.

Bob
Title: How to delete automatically messages tagged as Spam
Post by: volipind 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.