X-Git-Url: http://git.jankratochvil.net/?p=PerlMail.git;a=blobdiff_plain;f=PerlMail%2FConfig.pm;fp=PerlMail%2FConfig.pm;h=a8b0cd66f50f19a3a70f57f10d84fa6d98eb7e8a;hp=4179565e4da755b679e9f61779770a8f38ccbe7b;hb=e2cd7546e29fc32a82874a0c271dffbaf72c4d94;hpb=44259a1fa77c88cfa12ead6567f50e4eb102b6f6 diff --git a/PerlMail/Config.pm b/PerlMail/Config.pm index 4179565..a8b0cd6 100644 --- a/PerlMail/Config.pm +++ b/PerlMail/Config.pm @@ -31,6 +31,7 @@ use vars qw(@ISA @EXPORT); $HOME $Mail @ValidUsers $IdleMax $MaxBodySMS @SMSwebRcpt $SMSwebRcpt_username $Lock_pathname $PeerAddr $Socket_timeout $DB_table $DBI_database $DBI_user $DBI_pwd + $clamscan_waitpid_timeout $sendmail_orig @addr_addon &FromAddress @h_rcpt @h_from %audit_profile @sms_squeezes @alternates_host @dnsbl_whitelist @@ -43,7 +44,7 @@ require Mail::Alias; BEGIN { for (qw(headerhas store headeris did dnsbl store_muttrc_alternates Received_for parts_linear mime_type - body_first mimehead spamassassin header_remap lmtp_deliver)) { + body_first mimehead spamassassin clamscan header_remap lmtp_deliver)) { eval 'sub '.$_.' { return ::'.$_.'(@_); }'; } } @@ -80,6 +81,7 @@ our $lmtp_pwd; } our $lmtp_user_from="lace"; our $lmtp_user_to="lacemail"; +our $clamscan_waitpid_timeout=3; # perlmail-submit @@ -302,13 +304,8 @@ sub audit # Do not local $store_file as it is our-imported $store_profile="silent"; local $_; + store "=spam;virus=$_" if $_=clamscan(); store "=spam".($_ eq 1 ? "" : ";$_") if $_=spamassassin(); - }; - $store_profile=undef(); - return if did sub { - # Do not local $store_file as it is our-imported - $store_profile="silent"; - local $_; store "=spam" .";$_","log" if $_=dnsbl '.relays.ordb.org.' ,1; # all hosts store "=spam" .";$_","log" if $_=dnsbl '.blackholes.mail-abuse.org.' ,1; # all hosts # we don't check all hosts as they can be "dialup" category, FIXME: check for it