Re: Auto delete if >= X on per user basis

2006-06-06 Thread Mick Pollard

Theo Van Dinter wrote:

Just a fwiw:
:0
* ^X-Spam-Level: \*\*\*\*\*\*\*\*
/dev/null


  
A maildrop rule for those using maildrop. I have it so that all SPAM is 
sent to a .spam folder.

I have this folder set to a max of 50 mail at any given time.
It deletes the oldest mail to make room for new mail.
Quick and dirty hack but my customer liked it.
This could be modified to only delete those above a certain score maybe.

# filter all mail through spamd
#xfilter "/usr/bin/spamc"
#
#if (/^X-Spam-Flag: *YES/)
#   {
#   `cd $DEFAULT/.spam/new && rm -f \`ls -t | sed -e 1,50d\``
#   `test -d $DEFAULT/.spam`
#  if( $RETURNCODE == 1)
#  {
# `maildirmake $DEFAULT/.spam `
#  }
#  exception {
# to "$DEFAULT/.spam/"
# }
#}
#



Regards
Mick Pollard
__lunix-aus__


Re: Auto delete if >= X on per user basis

2006-06-06 Thread Ken A



Mark Martinec wrote:

Ken,


MailScanner works with Postfix and other MTAs as well, but it doesn't do
the 'per-user SA configs' unless you are using it with Sendmail, because
AFAIK, Postfix doesn't easily split multi-recipient emails, so incoming
mail must be passed into the scanner with multiple recipients, meaning
per-user S.A. configs are not possible.



Can Amavisd split multi-recipient email after passing through S.A.,


Yes. (when needed)


and then apply individual scoring/whitelists, etc??


Yes, taking into account per-recipient settings in amavisd.conf,
including individual tag/tag2/kill level (analogous to required_hits
in SA), as well as per-recipient white/blackliststs (soft or hard).
Inserted X-Spam* headers and Subject edits are also individualized,
all this with one call to SA per message, regardless of the number
of recipients. Mail is only split when header modifications are not
the same for all recipients, and even then is only split into
groups (clusters) of same-settings recipients.

Because SA is only called once per message, this implies that
only individualized settings from amavisd configuration can apply,
but not individualized settings from SA .cf files, such as
per-recipient rules or SA-based individual white/black lists
or per-recipient Bayes.


Very cool. Thanks for explaining how Amavisd-new handles this. 
MailScanner makes use of an S.A. cache (SQLite), so that it doesn't have 
to pass each multi recipient message through S.A. in order to apply per 
user rules, so some of the overhead of splitting messages in the 
incoming MTA (sendmail) is mitigated.


Ken A



  Mark



Re: Auto delete if >= X on per user basis

2006-06-06 Thread Will Nordmeyer
Thanks...

I actually have a few other things in my .procmailrc and base my 
decision on the X-SpamStatus-Yes, so this was the quick & dirty.

When I get spam, in addition to dead lettering it, I also forward it to 
[EMAIL PROTECTED] (nice automated process - bury the useless can SPAM mailbox 
with notifications that they are failing miserably).  I think that's 
why I have it exclusive locked.

Unless you think I could release it on that as well?  (Which might 
speed things up just a tiny bit).

> 
> 
> On Tue, Jun 06, 2006 at 06:53:53AM -0400, Will Nordmeyer wrote:
> > As in:
> > ---
> > SHELL=/bin/sh
> > 
> > :0:
> > * ^X-Spam-Level: 
> > {
> > :0
> > /dev/null
> > }
> > ---
> 
> Just a fwiw:
> 
> :0
> * ^X-Spam-Level: \*\*\*\*\*\*\*\*
> /dev/null
> 
> - there's no point in locking for writes to /dev/null (oh no, my 
blackhole got
>   corrupted message data!)
> - there's no point in having a block w/ a single target
> - you need to escape the asteriks since they're RE special chars (I 
can't even
>   quite tell what that's going to match...  0 or more spaces, 
followed by 0 or
>   more asteriks, followed by 0 or more asteriks, followed by ... ?)
> 
> :)
> 
> -- 
> Randomly Generated Tagline:
> An apple every eight hours will keep three doctors away.
> 
> 




Re: Auto delete if >= X on per user basis

2006-06-06 Thread Theo Van Dinter
On Tue, Jun 06, 2006 at 06:53:53AM -0400, Will Nordmeyer wrote:
> As in:
> ---
> SHELL=/bin/sh
> 
> :0:
> * ^X-Spam-Level: 
> {
> :0
> /dev/null
> }
> ---

Just a fwiw:

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

- there's no point in locking for writes to /dev/null (oh no, my blackhole got
  corrupted message data!)
- there's no point in having a block w/ a single target
- you need to escape the asteriks since they're RE special chars (I can't even
  quite tell what that's going to match...  0 or more spaces, followed by 0 or
  more asteriks, followed by 0 or more asteriks, followed by ... ?)

:)

-- 
Randomly Generated Tagline:
An apple every eight hours will keep three doctors away.


pgp33pfsJmR6G.pgp
Description: PGP signature


Re: Auto delete if >= X on per user basis

2006-06-06 Thread Mark Martinec
Ken,

> MailScanner works with Postfix and other MTAs as well, but it doesn't do
> the 'per-user SA configs' unless you are using it with Sendmail, because
> AFAIK, Postfix doesn't easily split multi-recipient emails, so incoming
> mail must be passed into the scanner with multiple recipients, meaning
> per-user S.A. configs are not possible.

> Can Amavisd split multi-recipient email after passing through S.A.,

Yes. (when needed)

> and then apply individual scoring/whitelists, etc??

Yes, taking into account per-recipient settings in amavisd.conf,
including individual tag/tag2/kill level (analogous to required_hits
in SA), as well as per-recipient white/blackliststs (soft or hard).
Inserted X-Spam* headers and Subject edits are also individualized,
all this with one call to SA per message, regardless of the number
of recipients. Mail is only split when header modifications are not
the same for all recipients, and even then is only split into
groups (clusters) of same-settings recipients.

Because SA is only called once per message, this implies that
only individualized settings from amavisd configuration can apply,
but not individualized settings from SA .cf files, such as
per-recipient rules or SA-based individual white/black lists
or per-recipient Bayes.

  Mark


Re: Auto delete if >= X on per user basis

2006-06-06 Thread Ken A



Gary V wrote:

Craig Mead wrote:

Hello all,

Pretty much all I'm trying to do is setup on a per-user basis an auto 
delete mechanism for mail if it receives > score XX.


If you throw MailScanner into the mix with SpamAssassin, you can do 
per user prefs in combination with sendmail (not postfix) and 
splitting messages with multiple recipients into single messages using 
sendmail's queue group functionality. Alternately, you could do it in 
a pop3 proxy.


Ken A.


Amavisd-new works well with Postfix. You can use static tables created 
directly in the configuration file if you have a small number of 
differing needs (settings), or SQL (or LDAP) if you have a greater 
number (and would also like to avoid restarting the daemon after each 
change). Like MailScanner, with amavisd-new you can also call anti-virus 
programs and selectively ban potentially malicious file types.


MailScanner works with Postfix and other MTAs as well, but it doesn't do 
the 'per-user SA configs' unless you are using it with Sendmail, because 
AFAIK, Postfix doesn't easily split multi-recipient emails, so incoming 
mail must be passed into the scanner with multiple recipients, meaning 
per-user S.A. configs are not possible. Can Amavisd split 
multi-recipient email after passing through S.A., and then apply 
individual scoring/whitelists, etc??


Ken



Gary V

_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/




Re: Auto delete if >= X on per user basis

2006-06-06 Thread Will Nordmeyer
Highly NOT recommended... but what I have users doing is this:

Assuming you're using sendmail/procmail... set up a .procmailrc file 
that checks for:

X-Spam-Level: 

(8 stars = spam score 8 or better).

If it is that - dump it to /dev/null

As in:
---
SHELL=/bin/sh

:0:
* ^X-Spam-Level: 
{
:0
/dev/null
}
---

--Will

> Hello all,
> 
> I've had a good look around but am unable to find an answer to this 
> exact scenario. I've had a bash @ using global settings on the 
> user_pref's file, but didn't appear to work, so figured I'd ask. If 
you 
> are aware of a reference to this that I've missed, I apologise.
> 
> Pretty much all I'm trying to do is setup on a per-user basis an auto 
> delete mechanism for mail if it receives > score XX. I've read all 
the 
> doco about the preferred method being to setup filters and do it 
client 
> side, but a number of clients of mine are getting a large amount of 
> spam, and we've been watching what's been flagged as such over a 6 
month 
> period and there's been only 1 instance of a false positive (which 
was 
> an exteremely spam like email anyway, so understandable) and the 
clients 
> more than happy to take that risk. Going to keep his required_score 
at 5 
> but want to auto-delete if it's above 8 or so. Any help would be 
greatly 
> appreciated.
> 
> TIA
> 
> 




Re: Auto delete if >= X on per user basis

2006-06-05 Thread Gary V

Craig Mead wrote:

Hello all,

Pretty much all I'm trying to do is setup on a per-user basis an auto 
delete mechanism for mail if it receives > score XX.


If you throw MailScanner into the mix with SpamAssassin, you can do per 
user prefs in combination with sendmail (not postfix) and splitting 
messages with multiple recipients into single messages using sendmail's 
queue group functionality. Alternately, you could do it in a pop3 proxy.


Ken A.


Amavisd-new works well with Postfix. You can use static tables created 
directly in the configuration file if you have a small number of differing 
needs (settings), or SQL (or LDAP) if you have a greater number (and would 
also like to avoid restarting the daemon after each change). Like 
MailScanner, with amavisd-new you can also call anti-virus programs and 
selectively ban potentially malicious file types.


Gary V

_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/




Re: Auto delete if >= X on per user basis

2006-06-05 Thread Ken A
If you throw MailScanner into the mix with SpamAssassin, you can do per 
user prefs in combination with sendmail (not postfix) and splitting 
messages with multiple recipients into single messages using sendmail's 
queue group functionality. Alternately, you could do it in a pop3 proxy.


Ken A.



Craig Mead wrote:

Hello all,

I've had a good look around but am unable to find an answer to this 
exact scenario. I've had a bash @ using global settings on the 
user_pref's file, but didn't appear to work, so figured I'd ask. If you 
are aware of a reference to this that I've missed, I apologise.


Pretty much all I'm trying to do is setup on a per-user basis an auto 
delete mechanism for mail if it receives > score XX. I've read all the 
doco about the preferred method being to setup filters and do it client 
side, but a number of clients of mine are getting a large amount of 
spam, and we've been watching what's been flagged as such over a 6 month 
period and there's been only 1 instance of a false positive (which was 
an exteremely spam like email anyway, so understandable) and the clients 
more than happy to take that risk. Going to keep his required_score at 5 
but want to auto-delete if it's above 8 or so. Any help would be greatly 
appreciated.


TIA



Re: Auto delete if >= X on per user basis

2006-06-05 Thread Theo Van Dinter
On Tue, Jun 06, 2006 at 09:07:43AM +1000, Craig Mead wrote:
> Pretty much all I'm trying to do is setup on a per-user basis an auto 
> delete mechanism for mail if it receives > score XX. I've read all the 

You can't do this from SpamAssassin.  You'd have to set something up
(procmail?) to do this for you after SA does its thing.

-- 
Randomly Generated Tagline:
"New York ... the city that never sleeps ... because we're scared to death."
 - Jon Stewart, The Daily Show, 2004/11/02


pgpYfkkYwdZED.pgp
Description: PGP signature


Auto delete if >= X on per user basis

2006-06-05 Thread Craig Mead

Hello all,

I've had a good look around but am unable to find an answer to this 
exact scenario. I've had a bash @ using global settings on the 
user_pref's file, but didn't appear to work, so figured I'd ask. If you 
are aware of a reference to this that I've missed, I apologise.


Pretty much all I'm trying to do is setup on a per-user basis an auto 
delete mechanism for mail if it receives > score XX. I've read all the 
doco about the preferred method being to setup filters and do it client 
side, but a number of clients of mine are getting a large amount of 
spam, and we've been watching what's been flagged as such over a 6 month 
period and there's been only 1 instance of a false positive (which was 
an exteremely spam like email anyway, so understandable) and the clients 
more than happy to take that risk. Going to keep his required_score at 5 
but want to auto-delete if it's above 8 or so. Any help would be greatly 
appreciated.


TIA