| Server IP : 189.126.111.107 / Your IP : 216.73.217.69 Web Server : Apache System : Linux www.gadotticar.com.br 5.4.0-135-generic #152-Ubuntu SMP Wed Nov 23 20:19:22 UTC 2022 x86_64 User : gadotticar ( 1000) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/doc/clamav/examples/ |
Upload File : |
#!/usr/bin/perl # Filters mail through clamav. Intended to be used as a maildrop xfilter, # So it takes care to exit 0 on success, and nonzero on error. Adds a # X-Virii-Status header. # Contributed by Joey Hess <joeyh@debian.org> to be used with procmail use strict; use warnings; $/=undef; my $msg=<>; open (CLAM, "| clamscan --quiet -") || die "cannot run clamscan: $!"; # The --mbox support is flakey and requires a From header as in a real # mbox. print CLAM "From foo\n"; print CLAM $msg; close CLAM; # Returns status of 1 for virii. my $status= ($? >> 8 == 1) ? "yes" : "no"; #print STDERR "status: ".($? >> 8)." $!\n"; open (FORMAIL, "|formail -i 'X-Virii-Status: $status'") || die "cannot run formail: $!!"; print FORMAIL $msg || die "cannot write to formail: $!"; close FORMAIL || die "formail failed: $!"; exit 0;