MOON
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
System: Linux csr818.wilogic.com 2.6.18-419.el5xen #1 SMP Fri Feb 24 22:50:37 UTC 2017 x86_64
User: digitals (531)
PHP: 5.4.45
Disabled: NONE
Upload Files
File: //scripts.20110531.215904.25158/patcheximconf
#!/usr/bin/perl

open(EXIMC,"/etc/exim.conf");
@EXIMC=<EXIMC>;
close(EXIMC);

open(EXIMC,">/etc/exim.conf");
foreach (@EXIMC) {
	if (/deliver_load_max/) { next; }
	if (/deliver_queue_load_max/) { next; }
	if (/queue_only_load/) { next; }
	if (/message_filter_user/) { next; }
	if (/message_filter_group/) { next; }
	if (/message_filter\s*=/) { 
print EXIMC <<EOM;
message_filter = /etc/antivirus.clam.exim

message_filter_user = mail
message_filter_group = mail

deliver_load_max = 3
deliver_queue_load_max = 5
queue_only_load = 4
EOM
		next;
	}
	print EXIMC;
}
close(EXIMC);

$ama=0;
open(EPL,"/etc/exim.pl");
while(<EPL>) {
	if (/amavis/) { $ama =1; }
}
close(EPL);

if ($ama == 0) {
	open(EPL,">>/etc/exim.pl");
	print EPL "do '/usr/share/amavis/amavis-filter';\n";
	close(EPL);
}

system("/scripts/restartsrv","exim");