You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Ky...@transplace.com on 2004/10/08 17:33:08 UTC

still can't delete spam...

More of the same...

(spamassassin 2.64 on freeBSD 5.2.1)

I appreciate the help I have recieved so far, but it still doesn't work...
and yes, I have read the wiki, and I have googled the hell out of it...

I cannot configure spamassassin to delete spam.  I have tried many, many
combinations of the procmailrc file, and the following is the current one.

It seems that the marked spam is never getting to this point, to have these
rules applied to it.  It is being marked and then being sent to the user,
marked as spam, so that part is working.  Is there another file somewhere
that I should be looking at to verify that the procmailrc ruleset is being
applied?  I have inherited this project after the person who installed it
left, so I apologize for  my "newbieness", and I would appreciate any help
anyone might offer.


( I have tried uncommenting

#:0:
#* ^X-Spam-Level: \*\*\*\*
#/dev/null

and

#:0 H
#* ^X-Spam-Level: \*\*\*\*\*\*
#/dev/null

to no avail...

Thanks a lot!


KR



# SpamAssassin sample procmailrc
#
# Pipe the mail through spamassassin (replace 'spamassassin' with 'spamc'
# if you use the spamc/spamd combination)
#
# The condition line ensures that only messages smaller than 250 kB
# (250 * 1024 = 256000 bytes) are processed by SpamAssassin. Most spam
# isn't bigger than a few k and working with big messages can bring
# SpamAssassin to its knees.
#
# The lock file ensures that only 1 spamassassin invocation happens
# at 1 time, to keep the load down.
#

:0fw: spamc.lock
* < 256000
| spamc

# 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. (This one is optional.)
#:0:
#* ^X-Spam-Level: \*\*\*\*
#/dev/null
#:0 H
#* ^X-Spam-Level: \*\*\*\*\*\*
#/dev/null
#almost-certainly-spam

# All mail tagged as spam (eg. with a score higher than the set threshold)
# is moved to "probably-spam".
:0:
* ^X-Spam-Status: Yes
/dev/null
#probably-spam

# Work around procmail bug: any output on stderr will cause the "F" in
"From"
# to be dropped.  This will re-add it.
:0
* ^^rom[ ]
{
  LOG="*** Dropped F off From_ header! Fixing up. "

  :0 fhw
  | sed -e '1s/^/F/'
}



Kyle Reynolds
972-731-4731
KyleReynolds@Transplace.com




Re: still can't delete spam...

Posted by Bob Apthorpe <ap...@cynistar.net>.
Hi,

On Fri, 8 Oct 2004 10:33:08 -0500 KyleReynolds@transplace.com wrote:
[...]
> It seems that the marked spam is never getting to this point, to have these
> rules applied to it.  It is being marked and then being sent to the user,
> marked as spam, so that part is working.  Is there another file somewhere
> that I should be looking at to verify that the procmailrc ruleset is being
> applied?  I have inherited this project after the person who installed it
> left, so I apologize for  my "newbieness", and I would appreciate any help
> anyone might offer.

Procmail is a weird and magical beast and its ways are most mysterious.
Meaning it's a big pain in the ass for new users and old, tired users
are not willing to build something more friendly because they've all
suffered through making it work for them. See also: vi, emacs.

Welcome to unix. :)

> ( I have tried uncommenting
> 
> #:0:
> #* ^X-Spam-Level: \*\*\*\*
> #/dev/null
> 
> and
> 
> #:0 H
> #* ^X-Spam-Level: \*\*\*\*\*\*
> #/dev/null
> 
> to no avail...

I'm using

:0H
* ^X-spam-status: yes
{
   # do something ...
}

The braces and the 'H' are probably unnecessary.

Try adding the following to the top of .procmailrc (adjust home
directory as necessary):

HOME=/path/to/your/home/directory
VERBOSE=yes
LOGFILE=${HOME}/procmail.log
DROPPRIVS=yes

Check procmail.log for clues.

Also, try using 

:0 H
* ^X-Spam-Level:[ 	]*\*\*\*\*\*\*
/dev/null

where [ 	] = [<space><tab>]*

hth,

-- Bob

Re: still can't delete spam...

Posted by Chris Marrin <ch...@marrin.com>.
sahil@hamla.org wrote:

> Quoting KyleReynolds@transplace.com:
> 
> 
>>It seems that the marked spam is never getting to this point, to have these
>>rules applied to it.  It is being marked and then being sent to the user,
>>marked as spam, so that part is working.
> 
> 
> If the headers are there, SA is doing its job.  Ask the procmail mailing list
> for help debugging that problem.

I do all the deletion in /etc/procmailrc, like so:

# LOGFILE=/var/log/procmail.log
DROPPRIVS=yes
:0fw: spamassassin.lock
* < 256000
| /usr/bin/spamc

# try a second time if Spamassassin failed

:0fw: spamassassin.lock2
* ! ^X-Spam-Level:.*
* < 256000
| /usr/bin/spamc

:0
* ^X-Spam-Status: Yes
* ^X-Spam-Level: \*\*\*\*\*\*\*
{
   :0
   { RULE="SPAM" }
   :0:
   /dev/null             # toss it
#  $HOME/mail/spam      # send it to spam folder
}

:0
* ^X-Spam-Status: Yes
{
   :0
   { RULE="SPAM" }
   :0:
   $HOME/mail/spam
}
----------

My server is small so I send it through spamc twice in case it failed 
the first time due to too many processes. Then I filter the result. If 
it is spam and the level is greater than 6.999 I send it to /dev/null. I 
actually started this level quite a bit higher (at like 10) and then 
ratcheted it down as I never found false positives up there. If it is 
spam but less that 7 (between 5 and 7) I send it to a spam folder in the 
user's box for checking for false positives. Otherwise it goes to the inbox.

-- 
Chris Marrin          | Senior Software Architect | Sony Corporation
phone: (408) 955-3049 | cmarrin@arch.sel.sony.com |
| What is this talk of software 'releases'? Klingons do not 'release' |
| software; our software ESCAPES, leaving a bloody trail of designers |
| and quality assurance people in its wake! (unknown author)          |

Re: still can't delete spam...

Posted by sa...@hamla.org.
Quoting KyleReynolds@transplace.com:

> It seems that the marked spam is never getting to this point, to have these
> rules applied to it.  It is being marked and then being sent to the user,
> marked as spam, so that part is working.

If the headers are there, SA is doing its job.  Ask the procmail mailing list
for help debugging that problem.

--
Sahil Tandon

Re: still can't delete spam...

Posted by Kai Schaetzl <ma...@conactive.com>.
 wrote on Fri, 8 Oct 2004 10:33:08 -0500:
 
> I cannot configure spamassassin to delete spam.
>

sa doesn't do this! Do you mean to send mail to /dev/null with procmail?

> procmailrc
>

why not ask the procmail list?

http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail


Kai

-- 

Kai Schätzl, Berlin, Germany
Get your web at Conactive Internet Services: http://www.conactive.com
IE-Center: http://ie5.de & http://msie.winware.org