Hi,
there is probably bug in reading "mynetworks"
configuration file in
amavis-new release 2.4.0. I want to specify local networks
in CIDR format
and I read the file with read_array function. In
amavisd.conf I have
following line:
mynetworks_maps =
(read_array('/etc/amavisd-mynetworks'), \ mynetworks);
and in /etc/amavisd-mynetworks I have something like
123.123.1.0/24
123.123.2.0/24
...
The function read_array add ' ' at the end of each line
and that's why
calling ip_to_vec fail with "Invalid IPv4 network mask
or CIDR prefix
length: [123.123.1.0/24 ]".
I fix it with following patch, but I don't thing it is the
best place to
fix this problem...
--- amavisd 2006-04-25 14:15:38.000000000 +0200
+++ amavisd 2006-04-25 14:15:26.000000000 +0200
 -3055,7
+3055,7 
my($ip,$allow_mask) = _;
my($ip_len); my( ip_fields);
local($1,$2,$3,$4,$5,$6);
- $ip =~ s/^[ \t]+//; $ip =~ s/[ \t\n]+\z//s; # trim
+ $ip =~ s/^[ \t]+//; $ip =~ s/[ \t\n]+\z//s; # trim
my($ipa) = $ip;
($ipa,$ip_len) = ($1,$2) if $allow_mask && $ip =~
m{^([^/]*)/(.*)\z}s;
$ipa = $1 if $ipa =~ m{^ \[ (.*) \] \z}xs; #
discard optional
brackets
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
AMaViS-user mailing list
AMaViS-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
|