bug-mailfromd
Re: [Bug-mailfromd] upgrading from 8 .1x.x to 9.0
>
> > I was thinking of upgrading, are there any specific issues?
>
I am having an issue with the internal match_cidr
18 module 'match_rhfsbl'.
19
20 require 'status'
21 require 'dns'
22 require 'match_cidr'
23
24 #pragma regex push +extended
25 func match_rhfsbl(string email, string zone, string iprange)
26 returns number
27 do
28 if iprange = 'ANY'
29 set iprange '127.0.0.0/8'
30 fi
31
32 return match_cidr (resolve (email, zone), iprange)
33 done
34 #pragma regex pop
mailfromd#1[11443]: RUNTIME ERROR near /usr/share/mailfromd/match_rhfsbl.mfl:32: uncaught exception e_invip: match_cidr: not a valid IP or CIDR: 0
mailfromd#1[11443]: execution of the filter program was not finished
I guess match_cidr is a bit stricter on the input? I can't really imagine this is a module I created, but it is also not in this default 9.0 dir.
I fixed it with this:
#pragma regex push +extended
func match_rhfsbl(string email, string zone, string iprange)
returns number
do
if iprange = 'ANY'
set iprange '127.0.0.0/8'
fi
set ip resolve (email, zone)
if ip = 0
return 0
fi
return match_cidr (ip, iprange)
done