aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2005-11-10 10:26:29 +0000
committerMatthias Andree <matthias.andree@gmx.de>2005-11-10 10:26:29 +0000
commit5a26cddfe3ad3d189aa77dc887390d8025172a3c (patch)
tree13e2eec5eacf62919937af16bcf2b0356d65f231 /fetchmail.c
parentecb3612c83cbc7f140663cd7266ae3879a643414 (diff)
downloadfetchmail-5a26cddfe3ad3d189aa77dc887390d8025172a3c.tar.gz
fetchmail-5a26cddfe3ad3d189aa77dc887390d8025172a3c.tar.bz2
fetchmail-5a26cddfe3ad3d189aa77dc887390d8025172a3c.zip
The default for --smtphost is now always "localhost" regardless of
authentication types and protocols, so as to simplify configurations for workstations where the SMTP daemon only listens on the loopback interface. Sunil Shetye & Matthias Andree svn path=/trunk/; revision=4410
Diffstat (limited to 'fetchmail.c')
-rw-r--r--fetchmail.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/fetchmail.c b/fetchmail.c
index 8ded6474..1f468bb8 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -922,7 +922,7 @@ static void optmerge(struct query *h2, struct query *h1, int force)
* - false if servers found on the command line */
static int load_params(int argc, char **argv, int optind)
{
- int implicitmode, st, use_kerberos;
+ int implicitmode, st;
struct passwd *pw;
struct query def_opts, *ctl;
struct stat rcstat;
@@ -1070,20 +1070,18 @@ static int load_params(int argc, char **argv, int optind)
* If we're using Kerberos for authentication, we need
* the FQDN in order to generate capability keys.
*/
- use_kerberos = 0;
- /* use_kerberos is saved until later to properly set the invisible
- * --smtphost (aka. smtphunt) default */
for (ctl = querylist; ctl; ctl = ctl->next)
if (ctl->active &&
(ctl->server.protocol==P_ETRN || ctl->server.protocol==P_ODMR
|| ctl->server.authenticate == A_KERBEROS_V4
|| ctl->server.authenticate == A_KERBEROS_V5))
{
- use_kerberos = 1;
+ fetchmailhost = host_fqdn(1);
break;
}
- fetchmailhost = host_fqdn(use_kerberos);
+ if (!ctl) /* list exhausted */
+ fetchmailhost = host_fqdn(0);
/* this code enables flags to be turned off */
#define DEFAULT(flag, dflt) if (flag == FLAG_TRUE)\
@@ -1158,7 +1156,7 @@ static int load_params(int argc, char **argv, int optind)
* Make sure we have a nonempty host list to forward to.
*/
if (!ctl->smtphunt)
- save_str(&ctl->smtphunt, use_kerberos ? fetchmailhost : "localhost", FALSE);
+ save_str(&ctl->smtphunt, "localhost", FALSE);
/*
* Make sure we have a nonempty list of domains to fetch from.