sendmail: use host rather than NIS domain name for HELO
authorRon Yorston <rmy@tigress.co.uk>
Sat, 28 Apr 2012 15:04:19 +0000 (17:04 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 28 Apr 2012 15:04:19 +0000 (17:04 +0200)
commit576b1d3c417ddea79481063401837ec0bdb91658
tree10ad0b85a5fa746442c3ad6e3607709f86d16aa6
parent0c62f20454b55a932d59c50b7418b8b634a8a23f
sendmail: use host rather than NIS domain name for HELO

According to RFC 5321 the argument to HELO "contains the fully-qualified
domain name of the SMTP client" or its IP address if no FQDN is available.
BusyBox sendmail uses the NIS domain name instead which, in many cases,
is likely to be the default "(none)". [vda: yes, I checked my machine
and its uts.domainname was indeed "(none)"]

Using the host name is more likely to satisfy the intent of the RFC while
allowing the otherwise unused safe_getdomainname function to be removed.

Signed-off-by: Ron Yorston <rmy@tigress.co.uk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
include/libbb.h
libbb/safe_gethostname.c
mailutils/sendmail.c