aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS4
-rw-r--r--fetchmail.c5
-rw-r--r--sink.c5
3 files changed, 12 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index f79f7ec4..d4d233c3 100644
--- a/NEWS
+++ b/NEWS
@@ -256,6 +256,10 @@ fetchmail 6.3.0 (not yet released officially):
other process's exit. Matthias Andree
* Man page: --sslfingerprint points user to x509(1ssl) and gives an example
how to use it. Debian Bug#213484, Eduard Bloch. (MA)
+* Try to obtain FQDN as our own host by default, rather than using "localhost".
+ If hostname cannot be qualified, complain noisily and continue, unless
+ Kerberos, ODMR or ETRN are used (these require a FQDN).
+ Partial fix of Debian Bug#150137. Fixes Debian Bug#316454. Matthias Andree
# INTERNAL CHANGES
* Switched to automake. Matthias Andree.
diff --git a/fetchmail.c b/fetchmail.c
index 93c5cd8b..6104d1c8 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -1076,10 +1076,13 @@ static int load_params(int argc, char **argv, int optind)
|| ctl->server.authenticate == A_KERBEROS_V4
|| ctl->server.authenticate == A_KERBEROS_V5))
{
- fetchmailhost = host_fqdn();
+ fetchmailhost = host_fqdn(1);
break;
}
+ if (!ctl) /* list exhausted */
+ fetchmailhost = host_fqdn(0);
+
/* this code enables flags to be turned off */
#define DEFAULT(flag, dflt) if (flag == FLAG_TRUE)\
flag = TRUE;\
diff --git a/sink.c b/sink.c
index 31da7dcd..9a80922b 100644
--- a/sink.c
+++ b/sink.c
@@ -293,10 +293,13 @@ static int send_bouncemail(struct query *ctl, struct msgblk *msg,
/* can't just use fetchmailhost here, it might be localhost */
if (fqdn_of_host == NULL)
- fqdn_of_host = host_fqdn();
+ fqdn_of_host = host_fqdn(0); /* can't afford to bail out and
+ lose the NDN here */
strlcat(daemon_name, fqdn_of_host, sizeof(daemon_name));
/* we need only SMTP for this purpose */
+ /* XXX FIXME: hardcoding localhost is nonsense if smtphost can be
+ * configured */
if ((sock = SockOpen("localhost", SMTP_PORT, NULL)) == -1)
return(FALSE);