diff options
author | Jonas Smedegaard <dr@jones.dk> | 2003-07-12 15:42:24 +0000 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2003-07-12 15:42:24 +0000 |
commit | 1b20499923a9c7146e6d2782599689015ca30f40 (patch) | |
tree | 39202c565dfbacaa007bd8ae6b2fcbc2b40a1ace | |
parent | 0eb98b99efa8f05b6d55e7382ae8fc29eff11c67 (diff) |
Only warn (not fail) if local_domains_ file not found. A few cosmetic tweaks.
-rw-r--r-- | amavis/amavisd.conf.addon | 10 | ||||
-rw-r--r-- | amavis/amavisd.conf.addon.in | 13 | ||||
-rwxr-xr-x | amavis/mkaddon.sh | 1 |
3 files changed, 20 insertions, 4 deletions
diff --git a/amavis/amavisd.conf.addon b/amavis/amavisd.conf.addon index af2fe67..70cf4e8 100644 --- a/amavis/amavisd.conf.addon +++ b/amavis/amavisd.conf.addon @@ -1,10 +1,11 @@ +#!/bin/perl ### WARNING: This file is generated automatically. ### Please edit amavisd.conf.addon.in and run mkaddon.sh # # /etc/local-COMMON/amavisd.conf.addon # Copyright 2002 Jonas Smedegaard <dr@jones.dk> # -# $Id: amavisd.conf.addon,v 1.10 2003-07-12 14:12:10 jonas Exp $ +# $Id: amavisd.conf.addon,v 1.11 2003-07-12 15:42:24 jonas Exp $ # # AMaViS configuration file addon (Debian package "amavisd-new") # @@ -25,7 +26,12 @@ $final_bad_header_destiny = D_BOUNCE; # We explicitly set local domains @local_domains_acl = undef; -read_hash(\%local_domains, "/etc/local-COMMON/amavis/local_domains_$mydomain"); +my $local_domain_file="/etc/local-COMMON/amavis/local_domains_$mydomain"; +if ( -f $local_domain_file ) { + read_hash(\%local_domains, $local_domain_file); +} else { + warn "Ignoring non-existing file $local_domain_file"; +} $spam_admin = "spamalert\@$mydomain"; diff --git a/amavis/amavisd.conf.addon.in b/amavis/amavisd.conf.addon.in index ce60af4..112fe3b 100644 --- a/amavis/amavisd.conf.addon.in +++ b/amavis/amavisd.conf.addon.in @@ -1,8 +1,9 @@ +#!/bin/perl # # /etc/local-COMMON/amavisd.conf.addon # Copyright 2002 Jonas Smedegaard <dr@jones.dk> # -# $Id: amavisd.conf.addon.in,v 1.1 2003-07-12 12:55:48 jonas Exp $ +# $Id: amavisd.conf.addon.in,v 1.2 2003-07-12 15:42:24 jonas Exp $ # # AMaViS configuration file addon (Debian package "amavisd-new") # @@ -21,9 +22,17 @@ $sa_auto_whitelist = 1; $final_spam_destiny = D_BOUNCE; $final_bad_header_destiny = D_BOUNCE; +# We set Postfix timeout to 1200 for the filter, so should be safe raising it here as well +$child_timeout=15*60; + # We explicitly set local domains @local_domains_acl = undef; -read_hash(\%local_domains, "/etc/local-COMMON/amavis/local_domains_$mydomain"); +my $local_domain_file="/etc/local-COMMON/amavis/local_domains_$mydomain"; +if ( -f $local_domain_file ) { + read_hash(\%local_domains, $local_domain_file); +} else { + warn "Ignoring non-existing file $local_domain_file"; +} $spam_admin = "spamalert\@$mydomain"; diff --git a/amavis/mkaddon.sh b/amavis/mkaddon.sh index 9840053..a9cda01 100755 --- a/amavis/mkaddon.sh +++ b/amavis/mkaddon.sh @@ -6,6 +6,7 @@ basedir="/etc/local-COMMON/amavis" destfile="amavisd.conf.addon" >"$basedir"/"$destfile".new cat <<EOF +#!/bin/perl ### WARNING: This file is generated automatically. ### Please edit $destfile.in and run mkaddon.sh EOF |