Enabling bounces

Julian Field MailScanner at ecs.soton.ac.uk
Thu May 24 16:06:03 IST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Kai Schaetzl wrote:
> John Wilcock wrote on Thu, 24 May 2007 13:52:52 +0200:
>
>   
>> Yes, you need to add a corresponding ruleset for the spam actions, with 
>> bounce set as an action for the offending sender.
>>     
>
> But then I do not understand the whole thing at all. If I put bounce in the 
> Spam Score Actions, then it will apply for everyone. If I make it a ruleset, 
> then I don't see how or why the other ruleset is necessary/works.
>   
Because it is necessary. If you want to bounce spam, you have to jump 
through some hoops. For a given message, spam actions has to evaluate to 
a result including "bounce", and enable spam bounce has to evaluate to 
"yes". The ruleset is necessary because I say it is :-)


> Example:
>
> Spam Actions = %rules-dir%/spam.actions.rules
> ->
> From:   IP  bounce
> FromOrTo:   default     default store notify header "X-Spam-Status: Yes"
>
> what for do I then need
> Enable Spam Bounce = %rules-dir%/bounce.rules
> for?
>
>   
>> Likewise, MailScanner won't bounce high scoring spam even if you tell it 
>> to via the Enable Spam Bounce rule (as I found out when I tried to send 
>> a GTUBE to test my setup!)
>>     
>
> Oh, I think I now understand, bummer. It's high-scoring spam that I want to 
> bounce back. So, using *only* 
> Enable Spam Bounce = %rules-dir%/bounce.rules
> (and not Spam Actions)
> would work if it is low-scoring spam?
>   
You can't bounce high-scoring spam at all. Sorry, fully intentional. But 
after all, you have the source code so there's nothing actually stopping 
you changing it.
> Hm. What I want to do is bounce spam (or other messages) back that I get 
> from a specific customer who moved to his own in-house poorly maintained 
> mailserver (Exchange). Instead of having a decent spam detection he bounces 
> all non-deliverable mail back via his smarthost - which happens to be me. If 
> I just stop him dead I'm gonna sure loose him. If I try to explain and 
> convince him (already tried) that he should "bounce" during the SMTP 
> connection it takes me a year. So, I wanted to boost all the messages that 
> come from postmaster at hisdomain via Spamassassin to 20 or so, detect them as 
> spam and bounce back to him until he understands.
> As the sender envelope is empty I can only rely on methods that look at the 
> mail headers. And I don't want to add another milter to the mix.
>   
MailScanner doesn't use the From: address in the headers at all, it only 
uses the envelope sender address.
> Any ideas how I can do it with MailScanner (as obviously what I had in mind 
> won't work).
>   
You could do it with a Custom Function tied to "Enable Spam Bounce" 
probably. I would need to think a bit about exactly what you would want 
to do. You want to spot spam coming from postmaster at hisdomain (in the 
From: header) and switch off its $message->{ishigh} flag so it gets 
treated as normal scoring spam, at which point you can bounce it. It's 
just a problem of working out which config option to attach the Custom 
Function to.

Jules

- -- 
Julian Field MEng CITP
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store

MailScanner customisation, or any advanced system administration help?
Contact me at Jules at Jules.FM

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
For all your IT requirements visit www.transtec.co.uk



-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.6.1 (Build 1012)
Charset: ISO-8859-1

wj8DBQFGVapCEfZZRxQVtlQRArjvAKC3RNJBC0rCgjomF7wqeVuBmjVXHwCgwT+Y
jviv3vrT/l2yhbI2wLTpOAo=
=m+kT
-----END PGP SIGNATURE-----

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
For all your IT requirements visit www.transtec.co.uk



More information about the MailScanner mailing list