You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by drkwc <dr...@mindbodyspiritjournal.com> on 2009/09/16 02:33:27 UTC

Can I auto-delete emails scoring 10 and above, yet mark as spam those 5 and above?

New Spamassassin nb qs:

On the configuration panel, I have SpamAssassin set to mark as spam any
email scoring 5 or above.

I have a rule set in Outlook Express to route those to a SpamAssassin SPAM
folder.

Now, I'm wondering, can I ALSO set the auto-delete function to delete -- at
server level -- any emails scoring 10 or higher. That would be really
convenient and would only deliver to my Outlook Express spam folder those
scoring lower than 10.

It's not clear to me that I can use both functions simultaneously. The
language on the Spam Assassin control panel says, for both functions, "Set
the number of hits required before a mail is considered spam."

Am wondering if I can have two different settings. One for auto delete and
another for marking and delivering emails?

Thank you,
ken
-- 
View this message in context: http://www.nabble.com/Can-I-auto-delete-emails-scoring-10-and-above%2C-yet-mark-as-spam-those-5-and-above--tp25463989p25463989.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: Can I auto-delete emails scoring 10 and above, yet mark as spam those 5 and above?

Posted by Rob McEwen <ro...@invaluement.com>.
drkwc wrote:
> My "Why" is that I get 1,500-plus spams daily on some of my older domains.

One thing you should double check is that you are blocking all
dictionary attack e-mails. What I mean is that a certain percentage of
spams are making wild guesses at the particular recipient's e-mail
addresses. If you have a "catch-all" account which says, "if that alias
doesn't exist, when that message here", then all those wild guess
dictionary attack spams will flood that mailbox. So make sure that you
have that "catch-all" feature (which is now a 'bug'... it used to be a
feature a decade ago) turned off. That way, all spam sent addresses
which don't exist will get rejected by your mail server before ANY kind
of spam filtering is needed. This is much more efficient than sending
these through spam assassin!

Or, am I wrong and these 1,500 spams really are being sent to actual
legit e-mail addresses?

-- 
Rob McEwen
http://dnsbl.invaluement.com/
rob@invaluement.com



Re: Can I auto-delete emails scoring 10 and above, yet mark as spam those 5 and above?

Posted by jdow <jd...@earthlink.net>.
From: "drkwc" <dr...@mindbodyspiritjournal.com>
Sent: Tuesday, 2009/September/15 21:20
>
> Jdow, you're pretty sophisticated with this. Afraid much of what you
> described is beyond my skillset and/or patience for mastering at the 
> moment.
>
>> >Am wondering if I can have two different settings. One for auto delete
>> and
>> >another for marking and delivering emails?
>
>>But why? And how would you differentiate them?
>
>>With my setup I could use two .procmailrc files and use a script to
>>switch between them. "But why?"
>
> My "Why" is that I get 1,500-plus spams daily on some of my older domains.
> It is my understanding that in SpamAssassin any email that scores 10 hits 
> or
> more is almost certainly spam (with an extremely, extremely low FP rate) 
> and
> that more than 80% of true spam detected by SpamAssassin has a score of 10
> or higher. So, if I can just eliminate that 80-plus% of the spam -- at
> server level -- sight unseen, then I don't have to download it to my
> computer, tying up my connection, and I don't have to sort through it in a
> spam folder in Outlook Express.
>
> I've just moved my sites to Hostgator.com. Actually still moving them. 
> And,
> yes, it's cPanel is extremely warm and fuzzy. I'd much prefer the standard
> out-of-the-box cpanel I've been working with for at least half a decade.
>
> I'll devote more time to mastering SpamAssassin when I'm in a position to
> budget that time to the task. And I'll have to demystify Hostgator's
> modified cPanel in the process. But bet that, with some help then, I can 
> get
> some rules written that will accomplish what I want.
>
> In the past, I've redirected most of my domains' email accounts through
> gmail, which does a wonderful job of sorting out the spam (and 
> automatically
> deleting everything in the spam folder that ages to 30 days). But, as I 
> can,
> I'd like to master SpamAssassin and see if I can get it to do what I need 
> it
> to do.
>
> I need it to kill the obvious spam (even if there is a 1 in 2,000 chance
> that it will kill a legitimate email in the process. I'll accept that 
> level
> of loss). And I need it to deliver (and let me filter to a spam folder on 
> my
> hard-drive) those that it identifies as less certain, but probable spam.
>
> Hope that can be accomplished.
>
> Hostgator told me that with their setup, using their SpamAssassin 
> controls,
> I can't set two concurrent rules. i.e. I can't tell SpamAssassin to
> autodelete any mail with a score of 10 or higher and also tell it to mark 
> as
> [SPAM] and deliver any mail with a score between 5 and 10.
>
> So, for now, I'm told I can't do what I want it to do.

Putting it bluntly you cannot delete anything with SpamAssassin as it
comes out of the distribution chain. You can mark it up, though. You
need to get further into the chain before you can play delete games
based on score. (It appears hostgator, whatever it is, only looks for
the X-Spam: yes tag and deletes on it. That's hostgator's bad. You can
have the spam score markup in the mail several different ways. Once you
know the score and have an adequate tool for the task you could, if you
wanted humor in your life, delete all messages scoring between 10 and
50. (Spams that score that high are often quite funny.) With some of
the potential markups you could even use features of the markups to
effectively re-score the message a little based on which of your email
addresses it was received on. (But, it's easier to do that within the
SA configuration files.)

The more you want to do with SA the more you have to learn and piddle
around with. And some of what you have to piddle with is murky and
obscure. (Procmail syntax is "strange" to say the least. And when you
put "formail", which is part of the procmail package, into the mix the
mind boggles.

And, for all its being a Microsoft tool you CAN do some interesting
magic within OutlookDepress and delete messages. So you have a lot of
tools at your disposal. The variety may depend on what operating systems
you have available for handling the mail. It all depends on how much you
want to get your hands (and mind {^_-}) dirty working with and learning
those tools.

{^_^} 


Re: Can I auto-delete emails scoring 10 and above, yet mark as spam those 5 and above?

Posted by drkwc <dr...@mindbodyspiritjournal.com>.

Thanks, Rob. So it looks like Hostgator has neutered Spamassassin.
-- 
View this message in context: http://www.nabble.com/Can-I-auto-delete-emails-scoring-10-and-above%2C-yet-mark-as-spam-those-5-and-above--tp25463989p25479369.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: Can I auto-delete emails scoring 10 and above, yet mark as spam those 5 and above?

Posted by Rob Sharp <ro...@boringbutgood.com>.

drkwc wrote:
> 
> Hostgator told me that with their setup, using their SpamAssassin controls,
> I can't set two concurrent rules. i.e. I can't tell SpamAssassin to
> autodelete any mail with a score of 10 or higher and also tell it to mark as
> [SPAM] and deliver any mail with a score between 5 and 10. 
> 

I#'m current on Hostgator also, shared server. They recently reduced the
functionality of their spamassassin install by removing the option to
tailor the subject lines for spammy mesages.

You can with er have it tagged with [SPAM], or remain untagged. Customer
subject rewrites were disabled, along with a lot of options that
user_prefs should allow.

They told me this was due to server load, and only moving to a dedicated
server would return that functionality. It was a bit of a pain for me,
since I used it to add details of the rules hit in the email header, and
also include the score in the subject line.

Rob


Re: Can I auto-delete emails scoring 10 and above, yet mark as spam those 5 and above?

Posted by drkwc <dr...@mindbodyspiritjournal.com>.
Jdow, you're pretty sophisticated with this. Afraid much of what you
described is beyond my skillset and/or patience for mastering at the moment.

> >Am wondering if I can have two different settings. One for auto delete
> and 
> >another for marking and delivering emails? 

>But why? And how would you differentiate them? 

>With my setup I could use two .procmailrc files and use a script to 
>switch between them. "But why?" 

My "Why" is that I get 1,500-plus spams daily on some of my older domains.
It is my understanding that in SpamAssassin any email that scores 10 hits or
more is almost certainly spam (with an extremely, extremely low FP rate) and
that more than 80% of true spam detected by SpamAssassin has a score of 10
or higher. So, if I can just eliminate that 80-plus% of the spam -- at
server level -- sight unseen, then I don't have to download it to my
computer, tying up my connection, and I don't have to sort through it in a
spam folder in Outlook Express.

I've just moved my sites to Hostgator.com. Actually still moving them. And,
yes, it's cPanel is extremely warm and fuzzy. I'd much prefer the standard
out-of-the-box cpanel I've been working with for at least half a decade. 

I'll devote more time to mastering SpamAssassin when I'm in a position to
budget that time to the task. And I'll have to demystify Hostgator's
modified cPanel in the process. But bet that, with some help then, I can get
some rules written that will accomplish what I want.

In the past, I've redirected most of my domains' email accounts through
gmail, which does a wonderful job of sorting out the spam (and automatically
deleting everything in the spam folder that ages to 30 days). But, as I can,
I'd like to master SpamAssassin and see if I can get it to do what I need it
to do. 

I need it to kill the obvious spam (even if there is a 1 in 2,000 chance
that it will kill a legitimate email in the process. I'll accept that level
of loss). And I need it to deliver (and let me filter to a spam folder on my
hard-drive) those that it identifies as less certain, but probable spam.

Hope that can be accomplished.

Hostgator told me that with their setup, using their SpamAssassin controls,
I can't set two concurrent rules. i.e. I can't tell SpamAssassin to
autodelete any mail with a score of 10 or higher and also tell it to mark as
[SPAM] and deliver any mail with a score between 5 and 10. 

So, for now, I'm told I can't do what I want it to do.
-- 
View this message in context: http://www.nabble.com/Can-I-auto-delete-emails-scoring-10-and-above%2C-yet-mark-as-spam-those-5-and-above--tp25463989p25465565.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: Can I auto-delete emails scoring 10 and above, yet mark as spam those 5 and above?

Posted by jdow <jd...@earthlink.net>.
From: "jdow" <jd...@earthlink.net>
Sent: Tuesday, 2009/September/15 20:06


> From: "drkwc" <dr...@mindbodyspiritjournal.com>
> Sent: Tuesday, 2009/September/15 17:33
>>
>> New Spamassassin nb qs:
>>
>> On the configuration panel, I have SpamAssassin set to mark as spam any
>> email scoring 5 or above.
>
> Not within SpamAssassin.
>
>> I have a rule set in Outlook Express to route those to a SpamAssassin 
>> SPAM
>> folder.
>
> That is what I do because I like to review the low scores for possible
> mismarked ham.
>
> I use these two lines in my user_prefs file.
> ===8<---
> required_hits           5.0
> rewrite_header Subject     *****SPAM***** _SCORE(00)_ **
> ===8<---
>
> Then I can sort my spam folder by score quite nicely for that review.
>
> I use procmail. So I could VERY easily develop a procmail rule to toss
> the spam or divert it for training. I don't. But that's the place I would
> have to do it if I did.
>
>> Now, I'm wondering, can I ALSO set the auto-delete function to delete --  
>> at
>> server level -- any emails scoring 10 or higher. That would be really
>> convenient and would only deliver to my Outlook Express spam folder those
>> scoring lower than 10.
>
> I use fetchmail to get mail. That feeds procmail. That feeds the mail
> spool. Dovecot reads the mail spool and feeds OutlookDepress. So *I*
> can do it at the server level before OE. Your configuration is probably
> different. You might be able to do it if you have your own server. If
> not, you can't.
>
> I'd strongly recommend hacking something together with fetchmail and
> some pop3 tool like dovecot. With procmail in the middle you can ruin
> your brain as you figure it out. But then you can do really strange
> things like rewrite message headers for this list so that the Reply-to
> address becomes this list. {^_-} (Yeah, I am a sneaky bi<oops!>)
>
>> It's not clear to me that I can use both functions simultaneously. The
>> language on the Spam Assassin control panel says, for both functions, 
>> "Set
>> the number of hits required before a mail is considered spam."
>
> Ain't such a thing that is recognized by SpamAssassin. It sounds like
> your setup is too warm and cuddly to be useful, IMAO. (And if you apply
> SpamAssassin on each message as you read it from the ISP's servers your
> punishment is insane delays and slowness.)
>
>> Am wondering if I can have two different settings. One for auto delete 
>> and
>> another for marking and delivering emails?
>
> But why? And how would you differentiate them?
>
> With my setup I could use two .procmailrc files and use a script to
> switch between them. "But why?"
>
> {o.o}

As an addendum, I note that with .procmailrc files and the .fetchmailrc
configuration file I could apply a different procmailrc file for each
site and ID for which I pull email into my internal spools if that is
what you need.

{^_^} 


Re: Can I auto-delete emails scoring 10 and above, yet mark as spam those 5 and above?

Posted by jdow <jd...@earthlink.net>.
From: "drkwc" <dr...@mindbodyspiritjournal.com>
Sent: Tuesday, 2009/September/15 17:33
>
> New Spamassassin nb qs:
>
> On the configuration panel, I have SpamAssassin set to mark as spam any
> email scoring 5 or above.

Not within SpamAssassin.

> I have a rule set in Outlook Express to route those to a SpamAssassin SPAM
> folder.

That is what I do because I like to review the low scores for possible
mismarked ham.

I use these two lines in my user_prefs file.
===8<---
required_hits           5.0
rewrite_header Subject     *****SPAM***** _SCORE(00)_ **
===8<---

Then I can sort my spam folder by score quite nicely for that review.

I use procmail. So I could VERY easily develop a procmail rule to toss
the spam or divert it for training. I don't. But that's the place I would
have to do it if I did.

> Now, I'm wondering, can I ALSO set the auto-delete function to delete --  
> at
> server level -- any emails scoring 10 or higher. That would be really
> convenient and would only deliver to my Outlook Express spam folder those
> scoring lower than 10.

I use fetchmail to get mail. That feeds procmail. That feeds the mail
spool. Dovecot reads the mail spool and feeds OutlookDepress. So *I*
can do it at the server level before OE. Your configuration is probably
different. You might be able to do it if you have your own server. If
not, you can't.

I'd strongly recommend hacking something together with fetchmail and
some pop3 tool like dovecot. With procmail in the middle you can ruin
your brain as you figure it out. But then you can do really strange
things like rewrite message headers for this list so that the Reply-to
address becomes this list. {^_-} (Yeah, I am a sneaky bi<oops!>)

> It's not clear to me that I can use both functions simultaneously. The
> language on the Spam Assassin control panel says, for both functions, "Set
> the number of hits required before a mail is considered spam."

Ain't such a thing that is recognized by SpamAssassin. It sounds like
your setup is too warm and cuddly to be useful, IMAO. (And if you apply
SpamAssassin on each message as you read it from the ISP's servers your
punishment is insane delays and slowness.)

> Am wondering if I can have two different settings. One for auto delete and
> another for marking and delivering emails?

But why? And how would you differentiate them?

With my setup I could use two .procmailrc files and use a script to
switch between them. "But why?"

{o.o} 


Re: Can I auto-delete emails scoring 10 and above, yet mark as spam those 5 and above?

Posted by 牛粥 <bh...@izb.knu.ac.kr>.
drkwc <dr...@mindbodyspiritjournal.com> writes:

> New Spamassassin nb qs:
>
> On the configuration panel, I have SpamAssassin set to mark as spam any
> email scoring 5 or above.
>
> I have a rule set in Outlook Express to route those to a SpamAssassin SPAM
> folder.
>
> Now, I'm wondering, can I ALSO set the auto-delete function to delete -- at
> server level -- any emails scoring 10 or higher. That would be really
> convenient and would only deliver to my Outlook Express spam folder those
> scoring lower than 10.
>
> It's not clear to me that I can use both functions simultaneously. The
> language on the Spam Assassin control panel says, for both functions, "Set
> the number of hits required before a mail is considered spam."
>
> Am wondering if I can have two different settings. One for auto delete and
> another for marking and delivering emails?

How about this -- "SPAMASSASSIN shell-based filter"? 
You can look it at Google. Actually that was useful for me.  

Sincerely,

-- 
"You cannot say 'no' to the people you love, not often. That's the secret.
And then when you do, it has to sound like a 'yes'. Or you have to make them
say 'no'. You have to take time and trouble. But I'm old-fashioned, you're
the new modern generation, don't listen to me."
		-- Vito Corleone, "Chapter 28", page 401

Re: Can I auto-delete emails scoring 10 and above, yet mark as spam those 5 and above?

Posted by drkwc <dr...@mindbodyspiritjournal.com>.
OK, thanks, John. It is cPanel. I'll contact my host and see if they can
answer.

Best,
kwc

-- 
View this message in context: http://www.nabble.com/Can-I-auto-delete-emails-scoring-10-and-above%2C-yet-mark-as-spam-those-5-and-above--tp25463989p25464101.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: Can I auto-delete emails scoring 10 and above, yet mark as spam those 5 and above?

Posted by John Hardin <jh...@impsec.org>.
On Tue, 15 Sep 2009, drkwc wrote:

> On the configuration panel,

SpamAssassin _has_ no configuration panel. That is some third-party tool. 
You will have to contact the support resource for whatever control panel 
tool (possibly cpanel?) that you're using.

Sorry we can't help...

-- 
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
  jhardin@impsec.org    FALaholic #11174     pgpk -a jhardin@impsec.org
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
  Windows and its users got mentioned at home today, after my wife the
  psych major brought up Seligman's theory of "learned helplessness."
 					     -- Dan Birchall in a.s.r
-----------------------------------------------------------------------
  2 days until the 222nd anniversary of the signing of the U.S. Constitution

Re: Can I auto-delete emails scoring 10 and above, yet mark as spam those 5 and above?

Posted by Mathias Homann <ad...@eregion.de>.
Am Mittwoch, 16. September 2009 02:33:27 schrieb drkwc:
> New Spamassassin nb qs:
> 
> On the configuration panel, I have SpamAssassin set to mark as spam any
> email scoring 5 or above.
> 
> I have a rule set in Outlook Express to route those to a SpamAssassin SPAM
> folder.
> 
> Now, I'm wondering, can I ALSO set the auto-delete function to delete -- at
> server level -- any emails scoring 10 or higher. That would be really
> convenient and would only deliver to my Outlook Express spam folder those
> scoring lower than 10.


like some others already said, SA has no configuration panel.


putting that aside, I'm doing exactly what you want to do.

I'm filtering mail thru spamassasin into a cyrus imap server that does server-
side sieve filters, and the last three sieve rules in my filter are like this, 
"delete everything with a score higher than X, then stop filtering";
"move everything marked as SPAM into that folder, then stop filtering";
"everything that has not been hit by any rule up to here goes into INBOX".


that way I don't loose anything from mailing lists because that is all handled 
before those three rules, spams with a really high score go to the dumpster, 
and "unclear" spam goes in for manual inspection (gets me between 1 and 5 spam 
mails per day for a whole domain...).

bye,
MH