You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If gethostname(3) / hostname(1) returns a non-FQDN (e.g. 'myhost' rather than 'myhost.example.org') which is not resolvable, then 'smtpd -n' fails with this message:
invalid hostname: getaddrinfo() failed: hostname nor servname provided, or not known
It seems to work OK if the hostname is a FQDN (even if unresolvable), or if the unqualified hostname is resolvable (e.g. it is in /etc/hosts as a localhost alias).
I don't know what the desired behavior is in this situation, but it seems that smtpd should be able to start up with no less difficulty than sendmail. Or, if smtpd is not designed to work with a non-FQDN hostname, the error message should be clearer about what the user should do, since it's not a problem with the smtpd config, per se. The message could say "smtpd requires that the local hostname, currently 'foo', be resolvable", and maybe also direct the user to check /etc/hosts.
[I first reported this on the opensmtpd-misc list, and was advised to file the report here. This first came up for me when using OpenSMTPD 5.7.3p1 from the FreeBSD ports collection on my BeagleBone Black. The FreeBSD snapshots for the BeagleBone come configured with a hostname of just "beaglebone" and no corresponding entry in /etc/hosts.]
The text was updated successfully, but these errors were encountered:
Sorry; I was waiting for the FreeBSD port to be updated before I could easily test the fix for this and #642 on my BeagleBone Black. The port was finally updated today, so I will be testing soon.
If gethostname(3) / hostname(1) returns a non-FQDN (e.g. 'myhost' rather than 'myhost.example.org') which is not resolvable, then 'smtpd -n' fails with this message:
invalid hostname: getaddrinfo() failed: hostname nor servname provided, or not known
It seems to work OK if the hostname is a FQDN (even if unresolvable), or if the unqualified hostname is resolvable (e.g. it is in /etc/hosts as a localhost alias).
I don't know what the desired behavior is in this situation, but it seems that smtpd should be able to start up with no less difficulty than sendmail. Or, if smtpd is not designed to work with a non-FQDN hostname, the error message should be clearer about what the user should do, since it's not a problem with the smtpd config, per se. The message could say "
smtpd requires that the local hostname, currently 'foo', be resolvable
", and maybe also direct the user to check /etc/hosts.[I first reported this on the opensmtpd-misc list, and was advised to file the report here. This first came up for me when using OpenSMTPD 5.7.3p1 from the FreeBSD ports collection on my BeagleBone Black. The FreeBSD snapshots for the BeagleBone come configured with a hostname of just "beaglebone" and no corresponding entry in /etc/hosts.]
The text was updated successfully, but these errors were encountered: