aboutsummaryrefslogtreecommitdiff
path: root/mflib/match_rhsbl.mf
diff options
context:
space:
mode:
Diffstat (limited to 'mflib/match_rhsbl.mf')
-rw-r--r--mflib/match_rhsbl.mf12
1 files changed, 8 insertions, 4 deletions
diff --git a/mflib/match_rhsbl.mf b/mflib/match_rhsbl.mf
index 9b2a492a..d08f103b 100644
--- a/mflib/match_rhsbl.mf
+++ b/mflib/match_rhsbl.mf
@@ -1,5 +1,6 @@
/* RHSBL checker.
Copyright (C) 2006, 2007 Jan Rafaj
+ Copyright (C) 2008 Sergey Poznyakoff
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,14 +19,17 @@
#require match_cidr
#pragma regex push +extended
-func match_rhsbl(string email, string zone, string range)
+func match_rhsbl(string email, string zone, string iprange)
returns number
do
- if not (%email matches '@.+$'
- and %range matches '^([0-9]{1,3}\.){3}[0-9]{1,3}$')
+ if %iprange = 'ANY'
+ set iprange '127.0.0.0/8'
+ fi
+ if not (%email matches '@.+$'m4_ifdef(`COMPAT_4_3',`
+ and %iprange matches `'''`^([0-9]{1,3}\.){3}[0-9]{1,3}/[0-9]{1,2}$'`''))
return 0
fi
- return match_cidr (resolve ((domainpart %email), %zone), %range)
+ return match_cidr (resolve ((domainpart %email), %zone), %iprange)
done
#pragma regex pop

Return to:

Send suggestions and report system problems to the System administrator.