Page 1 of 1
Greylist issues with IPv6
Posted: 05 Aug 2020 02:58
by glemme
Somehow greylisting does not work properly when running IPv6.
the sending server is acting correctly and tries to resubmit the message but still keeps on being greylisted.
Have disabled IPv6 for now to solve it. But would like to have it on and still have grey listing working.
Re: Greylist issues with IPv6
Posted: 05 Aug 2020 03:11
by glemme
And to follow up on myself.
I tried whitelisting IPv6 senders. But still ended up in greylist.
Re: Greylist issues with IPv6
Posted: 21 Oct 2020 15:44
by hunter-nl
This is because the used ipv6 non EUI64 addresses the mailservers using. Like google mailservers uses many many many unique non EUI64 ipv6 addresses. And then it takes a very long time to get through the greylisting...
You can patch this by change the following function in /usr/sbin/sqlgrey
Code: Select all
sub ipv6_smart($) {
my $addr = ipv6_normalise(shift);
if (ipv6_is_eui64($addr) and ipv6_is_global_unicast($addr)) {
## For EUI64 return just the prefix/64
return join(":", (split(/:/, $addr))[0..3]);
} else {
## For Non-EUI64 or Non-Global-Unicast return the address
return $addr;
}
}
Into (see the else section for the difference

)
Code: Select all
sub ipv6_smart($) {
my $addr = ipv6_normalise(shift);
if (ipv6_is_eui64($addr) and ipv6_is_global_unicast($addr)) {
## For EUI64 return just the prefix/64
return join(":", (split(/:/, $addr))[0..3]);
} else {
## For Non-EUI64 or Non-Global-Unicast return the address
#return $addr;
return join(":", (split(/:/, $addr))[0..3]);
}
}
It will now whitelist IPv6 /64 prefixes instead of each unique non EUI64 ipv6 /128 address.
Re: Greylist issues with IPv6
Posted: 28 Oct 2020 08:05
by pdwalker
shawniverson, is this a change that should be pushed up to the sqlgrey folks?
Re: Greylist issues with IPv6
Posted: 28 Oct 2020 12:02
by shawniverson