-
Hi, I noticed that iprev doesn't seem to work on my instance of Stalwart Mail running in Docker. The error message is either I'm not sure what is causing these issues, is this expected behaviour? If not, how can I debug this if it is not an issue with Stalwart Mail? Thanks for any help! Detailed logsThis is the part of the config that is likely relevant: [resolver]
type = "system"
#preserve-intermediates = true
concurrency = 2
timeout = "5s"
attempts = 2
try-tcp-on-error = false
[resolver.cache]
txt = 2048
mx = 1024
ipv4 = 1024
ipv6 = 1024
ptr = 1024
tlsa = 1024
mta-sts = 1024
[auth.iprev]
verify = [
{ if = "listener", eq = "smtp", then = "relaxed" },
{ else = "disable" },
]
[auth.dnsbl]
verify = [
{ if = "listener", eq = "smtp", then = [
"ip",
"iprev",
"ehlo",
"return-path",
"from",
] },
{ else = [
] },
]
[auth.dnsbl.lookup]
ip = ["zen.spamhaus.org", "bl.spamcop.net", "b.barracudacentral.org"]
domain = ["dbl.spamhaus.org"] I made a few tests using ebay.com's password reset. Using the above config produces this log:
The email gets delivered, but note the delay of 15 seconds. Setting
If I use
Also note that Reverse IP lookups on the Docker host work fine: $ dig -x 66.211.184.88
88.184.211.66.in-addr.arpa. 3600 IN PTR mxphxpool1022.ebay.com. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, This has now been fixed, thanks for the report! The problem was that when binding to an IPv6 address, all remote IPv4 addresses are mapped to IPv6 (as you can see in your logs). The resolver was trying to lookup an IPv4 address as IPv6 which failed. This is probably a bug in the DNS libary but it was fixed in Stalwart by converting IPv6 mapped addresses back to IPv4. The fix is now in the repository and this week or the next it will be included in the next release. In the meantime, if you do not have an IPv6 address on your server, you can fix this by binding all listeners to |
Beta Was this translation helpful? Give feedback.
Hi,
This has now been fixed, thanks for the report! The problem was that when binding to an IPv6 address, all remote IPv4 addresses are mapped to IPv6 (as you can see in your logs). The resolver was trying to lookup an IPv4 address as IPv6 which failed. This is probably a bug in the DNS libary but it was fixed in Stalwart by converting IPv6 mapped addresses back to IPv4.
The fix is now in the repository and this week or the next it will be included in the next release. In the meantime, if you do not have an IPv6 address on your server, you can fix this by binding all listeners to
0.0.0.0
instead if[::]
.