Hi Mark,

I have got it working now, but it is not working as i expected.

If i send an email, with the subject : richard

And i modify the regexp, the email is not being spamchecked.... that
part works.... great.

But it is not placed in quarantaine.... my second issue...

Should I modify : CC_SPAM,0 to CC_SPAM,1 ?? Or am I completly wrong here :-)

Greetings... Richard

Mark Martinec wrote:
> Richard,
> 
>> I have looked at multiple products, but there is none that will meet my
>> wishes. What I am basically looking for is this :
>>
>> Message arrives from our isp
>> A program (amavis ?) looks at the subject, or at the X-Spam header line.
>> If (X-Spam-Flag: YES) then place it in (a) quarantaine.
>>
>> Is this possible with amavis but without a spamcheck ?
> 
> Yes, possible through custom hooks.
> 
> Append the following at the end of amavisd.conf, or place it
> on a separate file and invoke it from amavisd.conf by a:
>   include_config_files('/etc/amavisd-custom.conf');
> 
> (and adjust a regexp *\*\*SomeMagicSpamTag\*\* to your needs)
> 
> 
> package Amavis::Custom;
> use strict;
> # invoked at child process creation time;
> # return an object, or just undef when custom checks are not needed
> sub new {
>   my($class,$conn,$msginfo) = @_;
>   my($self) = bless {}, $class;
>   my($subj) = $msginfo->get_header_field_body('subject');
>   if ($subj =~ /^[ \t]*\*\*SomeMagicSpamTag\*\*/) {
>     $msginfo->add_contents_category(CC_SPAM,0);
>     for my $r (@{$msginfo->per_recip_data}) {
>       $r->add_contents_category(CC_SPAM,0);
>       $r->bypass_spam_checks(1);
>     }
>   }
>   $self;  # returning an object activates further callbacks,
>           # returning undef disables them
> }
> 1;
> 
> 
> Mark
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> AMaViS-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/amavis-user
> AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
> AMaViS-HowTos:http://www.amavis.org/howto/

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to