spamassassin-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gregorie <>
Subject Re: delete spam instead of marking as spam
Date Sun, 05 Jun 2011 15:17:16 GMT
On Sun, 2011-06-05 at 07:00 -0700, asimhafeez wrote:
> Hi,
> Is there any possibility to delete spam instead of marking (rewriting) the
> emails as [SPAM] in subject.
> In my scenario users mailboxes are hosted to another machine and i want to
> filter the spam in a separate machine instead of filtering it on the email
> hosting server.
As others have said,it depends how you are passing mail to SA. Bearing
in mind that all SA does is to mark mail as spam or ham,here are s0ome

- if you're passing mail to SA at SMTP time, i.e. before your MTA
  accepts it, you can reject the message. THIS IS THE ONLY PLACE WHERE
  YOU CAN REJECT SPAM. Doing so after your MTA has accepted it will
  merely add to the spam problem since the sender is almost certainly
  forged, a rejection after this point will be sent to the poor sod
  whose address was forged as the sender.

- you could implement greylisting at SMTP time and let your MTA scan
  anything that gets past the greylist with SA. This doesn't answer your
  question but it does reduce the SA workload. It will also get rid of a
  lot of spam: when my ISP introduced greylisting the spam I got reduced
  from 80% of all incoming mail to 8%.

- you can add a program after SA in your MTA's spam scanner to redirect
  spam to a spam bucket address. Some MTAs might let you silently delete
  spam at this point: AFAIK Postfix, which I use, won't. What you do
  with the contents of the spam bucket is up to you.

- if you're using fetchmail or getmail to retrieve mail from your ISP
  and its being passed through SA before being sent to an MTA or put in
  a mailbox then you can add another program that deletes spam by not
  passing it on to the MTA or whatever. This is OK for a low-volume
  situation, i.e. a personal system or one belonging to a small
  business. My system works this way.

Everything I've just suggested can be done before the messages are
passed to the second machine.

- As others have said, you can also use procmail to further process
  and/or delete spam as it arrives at the recipients mailbox. This allow
  your users some individual control over the spam they receive.


View raw message