[Mimedefang] Bounce spam with hit counts between 5-10...

James Ebright jebright at esisnet.com
Thu May 26 14:23:39 EDT 2005


On Wed, 25 May 2005 14:46:55 -0400, Jamie Pratt wrote
action_bounce  merely  makes  a  note  that the message is to be
bounced; remaining parts are still processed.  If  action_bounce
is  called  for more than one part, the mail is bounced with the
message in the final call to action_bounce.  You can  profitably
call  action_quarantine followed by action_bounce if you want to
keep a copy of the offending part.  Note that the message is not
bounced  immediately;  rather, remaining parts are processed and
the message is bounced after all parts have been processed.

Note that despite its name, action_bounce does  not  generate  a
"bounce  message".   It  merely rejects the message with an SMTP
failure code.

So you need to return out of filter_end??  yourself or use the elseif like I
have it below or something liek that depending on what you are doing with that
is_spam flag.

I would define your floor and ceiling where you have any other vars defined
for easier maintainability and quaranteens entire message as well for easy
re-delivery of FPs (and having em in variables like this will make perl do the
right thing)

Also, you do realize anything that scores 11 or higher will be "archived" as
you described and not bounced, seems odd to me to bounce 5-10.999 but allow
delivery (although archived) for 11+

Something like:

my $bounce_floor = 5;
my $bounce_ceiling = 11;


...


if (($hits >= $bounce_floor) && ($hits < $bounce_ceiling)) {
  action_quarantine_entire_message();
  action_bounce("WARNING: Your email is being returned as it was flagged as
SPAM, email abuse\@YOURDOMAIN.COM to request whitelist. $hits");
} elsif ($hits >= $req) {
  $is_spam=1; 

...


> # Spam!!
>      if ($hits >= $req ) {
>          $is_spam=1;
> 
> 	#### NEW CODE HERE #####
> 	if (($hits > 5) && ($hits < 11)) {
> 		md_graphdefang_log('SPAM BOUNCED', $hits, $names);
> 	        action_bounce("WARNING: Your email is being returned as 				
> it was flagged as SPAM.");         }
> 
> 	#### END NEW CODE ####




--
EsisNet.com Webmail Client




More information about the MIMEDefang mailing list