Hello guys,

We've started to use Amavisd::Custom some time ago, and
it's really great.

Today there is just one feature missing to finish the project
here, but we couldn't find how to do it at docs, could you
help us?

We have this scenario:

1. We have a policy called AUDIT, amavis listen port 10098
just for this policy and save a copy of the email for auditing:

$interface_policy{'10098'} = 'AUDIT';

$policy_bank{'AUDIT'} = {
        archive_quarantine_method => 'local:audit/%m.gz',
        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],
};

2. In amavisd-custom.conf we send a copy of email to this
port and the original one is delivery to its destination:

    open(AUDT,"<$filtros_dir/auditorship");
    my @rcpt_audit = <AUDT>;
    close(AUDT);

    for my $r (@{$msginfo->per_recip_data}) {
        my $email_addr = $r->recip_addr;
        if ( grep(/$email_addr/i,  @rcpt_audit) ){
            my($notification) = Amavis::In::Message->new;
            $notification->rx_time($msginfo->rx_time);
            $notification->log_id($log_id);
            $notification->delivery_method('smtp:[127.0.0.1]:10098');
            $notification->sender('');
            $notification->sender_smtp('<>');
            $notification->recips([$email_addr]);
            $notification->mail_text( $msginfo->mail_text );
            Amavis::mail_dispatch($conn, $notification, 1, 0);
        }
    }

JFYI, this block is inside checks() function.

It does the trick, but we think it's not a good solution since
it generates more tcp sockets, a new email, with a new id
and other many reasons.

the point is, we don't have idea how can we solve this, how
can we send a copy of the email to AUDIT policy and another
one to final destiny, or to quarantine.

Is there a way to do it using Amavis::Custom? Could you give
us some help, guide some kind of doc, example, anything?

Thank you in advance
-- 
Renato Botelho

-------------------------------------------------------------------------
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