Robert,
> > > How do I call an external script upon INFECTED or Spam-Score > 10
> >
> > This is not available without hacking the code, there is no mechanism
> > to specify plugins (except when their function is similar to a virus
> > scanner).
> Hm, how about patches?
Something like this?
--- amavisd.ori Thu Oct 20 20:10:04 2005
+++ amavisd Thu Oct 20 20:10:27 2005
@@ -7730,6 +7730,22 @@
do_log(0, $logline) if $logline ne '';
}
}
+ if (@virusname || $spam_level > 10) {
+ use IO::Socket::UNIX;
+ my($socketname) = '/var/tmp/some-socket';
+ my($sock);
+ $sock = IO::Socket::UNIX->new(Type => SOCK_STREAM)
+ or die "Can't create UNIX socket: $!";
+ if (!$sock->connect(pack_sockaddr_un($socketname))) {
+ do_log(0, "Can't connect to UNIX socket $socketname: $!");
+ } else {
+ my($sr) = expand(\'-envelope="%s", -first="%e" -last="%a"',
+ \%mybuiltins);
+ do_log(2, "Sending to $socketname: $$sr");
+ $sock->print($$sr) or die "Can't write to socket $socketname: $!";
+ $sock->close or die "Error closing socket $socketname: $!";
+ }
+ }
if (c('log_recip_templ') ne '') { # do per-recipient log entries
# redefine macros with a by-recipient semantics
for my $r (@{$msginfo->per_recip_data}) {
> I don't want to use amavis as a pre-queue Content scanner.
> I just want the first MTA from the received line, or the last, which
> doesn't belong to my network or localhost.
> I want -envelope="[EMAIL PROTECTED]", -first="66.178.40.24"
> -last="81.7.140.99"
> piped to a local cache daemon via unix socket.
I see.
Mark
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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/