On Thu, Aug 21, 2008 at 7:35 PM, Mark Martinec
<[EMAIL PROTECTED]> wrote:
>
> Lucas,
>
> > I am developing a mail filter and I would like to know if I can
> > reject a message in befored_send function.
> > Can I do it?
>
> I assume you are referring to amavisd custom hook 'before_send'.
Yes, that's right
> The 'before_send' is a bit late, the 'checks' hook would be
> more suitable. The idea is to set $r->recip_destiny to D_REJECT
> and $r->recip_done(1) for all recipients.
>
> Note that D_REJECT is not useful in a typical Postfix or dual-MTA
> setup where filtering takes place after message has already been
> recieved and queued. Rejecting a message is only suitable for
> pre-queue setups like a milter setup.
Using reject word I couldn't give you right information, actually, I'm writing
some kind of filter that has 4 action if match some regular expression on
some specific headers, here they are:
1. Accept the email (send it to original To:)
2. Discard email
3. Quarantine
4. Audit
Today i can do options 1 and 3, but don't know how to make 2 and 4.
In Audit case, I have this policy called AUDIT:
$interface_policy{'10098'} = 'AUDIT';
# Define a policy AUDIT
$policy_bank{'AUDIT'} = {
archive_quarantine_method => 'sql:@audit_sql_dsn',
forward_method => undef, # lose mail!
bypass_decode_parts => 1,
bypass_virus_checks_maps => [1],
bypass_spam_checks_maps => [1],
bypass_banned_checks_maps => [1],
bypass_header_checks_maps => [1],
};
It was created this way because who sent it back to amavisd-new was
maildrop, but now we are droping maildrop and trying to do all necessary
filters using Amavis::Custom hook, to consume less resources.
Could you giveme some direction?
Lucas
-------------------------------------------------------------------------
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/