rspamd: disable greylisting for forwarding hosts
parent
33b0167bcc
commit
a4ccd780c6
|
@ -28,6 +28,7 @@ function in_net($addr, $net) {
|
||||||
return substr($addr_bin, 0, $mask) == substr($net_bin, 0, $mask);
|
return substr($addr_bin, 0, $mask) == substr($net_bin, 0, $mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($_GET['host'])) {
|
||||||
try {
|
try {
|
||||||
foreach ($redis->hGetAll('WHITELISTED_FWD_HOST') as $host => $source) {
|
foreach ($redis->hGetAll('WHITELISTED_FWD_HOST') as $host => $source) {
|
||||||
if (in_net($_GET['host'], $host)) {
|
if (in_net($_GET['host'], $host)) {
|
||||||
|
@ -41,4 +42,14 @@ catch (RedisException $e) {
|
||||||
echo '200 DUNNO';
|
echo '200 DUNNO';
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
foreach ($redis->hGetAll('WHITELISTED_FWD_HOST') as $host => $source) {
|
||||||
|
echo $host . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (RedisException $e) {
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
whitelisted_ip = "http://172.22.1.251:8081/forwardinghosts.php";
|
Loading…
Reference in New Issue