-
-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Host names truncated to 64 chars #1252
Comments
Hello, thanks for the report. Is this a glibc-thing? on alpine limits.h defines HOST_NAME_MAX to 255, but I can see that on debian is 64. (the VERSION section of gethostname(2) on linux seem have some commentary.) I guess we'll have to use |
In limits.h there is an interesting note saying that the minimum acceptable value for HOST_NAME_MAX is _POSIX_HOST_NAME_MAX. |
Debian based systems have an HOST_NAME_MAX lower than _POSIX_HOST_NAME_MAX and it causes the issue OpenSMTPD#1252 Clamp HOST_NAME_MAX in the sysconf way: https://manpages.ubuntu.com/manpages/trusty/fr/man3/sysconf.3.html
I'm using OpenSMTPD 7.5.0p0, on Funtoo Linux with glibc-2.33, with rdns and fcrdns filters enabled. And my system is affected by this issue. Before applying morille@b9a09d6, I had a lot of fcrdns errors similar to this
as host names longer than 64 chars were truncated that caused fcrdns filter to fail, e.g. from |
Debian based systems have an HOST_NAME_MAX lower than _POSIX_HOST_NAME_MAX and it causes the issue OpenSMTPD#1252 It is usually clamped by sysconf: https://manpages.ubuntu.com/manpages/trusty/fr/man3/sysconf.3.html Using a new SMTPD_HOST_NAME_MAX define to hold the correct value without redefining HOST_NAME_MAX
Debian based systems have an HOST_NAME_MAX lower than _POSIX_HOST_NAME_MAX and it causes the issue OpenSMTPD#1252 It is usually clamped by sysconf: https://manpages.ubuntu.com/manpages/trusty/fr/man3/sysconf.3.html Using a new SMTPD_HOST_NAME_MAX define to hold the correct value without redefining HOST_NAME_MAX
I have an OpenSMTPD 6.6.4p1 instance running on an Ubuntu 20.04.6 LTS machine, installed using package manager.
When receiving emails from hosts with a name longer than 64 characters, the name used for the fc-rDNS check is truncated to 64 chars, and the connection is discarded.
It seems that is because HOST_NAME_MAX defaults to 64 on most linux distros.
Is there an "easy" way to change this ?
The text was updated successfully, but these errors were encountered: