diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2005-11-10 10:26:29 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2005-11-10 10:26:29 +0000 |
commit | 5a26cddfe3ad3d189aa77dc887390d8025172a3c (patch) | |
tree | 13e2eec5eacf62919937af16bcf2b0356d65f231 | |
parent | ecb3612c83cbc7f140663cd7266ae3879a643414 (diff) | |
download | fetchmail-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
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | fetchmail.c | 12 | ||||
-rw-r--r-- | fetchmail.man | 28 |
3 files changed, 20 insertions, 24 deletions
@@ -29,6 +29,10 @@ fetchmail 6.3.0 (not yet released officially): (1997) or v3 (2001, aka IEEE Std 1003.1-2001) are no longer supported. They may continue to work and non-intrusive patches to support them may be accepted. Matthias Andree +* 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 # OBSOLETION WARNINGS * The MX and host alias lookups that fetchmail performs in multidrop mode are 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. diff --git a/fetchmail.man b/fetchmail.man index ccea5afb..35dc8d8c 100644 --- a/fetchmail.man +++ b/fetchmail.man @@ -437,15 +437,13 @@ Specify a hunt list of hosts to forward mail to (one or more hostnames, comma-separated). Hosts are tried in list order; the first one that is up becomes the forwarding target for the current run. The default depends on the authentication methods and protocols used on -the active servers. If Kerberos is used for authentication or the ODMR -or ETRN protocol is used for any active server, the FQDN of the machine -running fetchmail is used as a default for smtphost. Otherwise, -'localhost' is used as a default. Each hostname may have a port number -following the host name. The port number is separated from the host -name by a slash; the default port is 25 (or "smtp" under IPv6). If you -specify an absolute path name (beginning with a /), it will be -interpreted as the name of a UNIX socket accepting LMTP connections -(such as is supported by the Cyrus IMAP daemon) +the active servers. If this option is not specified, 'localhost' is used +as a default. Each hostname may have a port number following the host +name. The port number is separated from the host name by a slash; the +default port is 25 (or "smtp" under IPv6). If you specify an absolute +path name (beginning with a /), it will be interpreted as the name of a +UNIX socket accepting LMTP connections (such as is supported by the +Cyrus IMAP daemon) Example: .sp .nf @@ -465,8 +463,7 @@ default is the FQDN of the machine running .B \-D <domain> | \-\-smtpaddress <domain> (Keyword: smtpaddress) Specify the domain to be appended to addresses in RCPT TO lines shipped to SMTP. The name of the SMTP server (as -specified by --smtphost, or defaulted to "localhost") is used when -this is not specified. +specified by --smtphost, which see) is used when this is not specified. .TP .B \-\-smtpname <user@domain> (Keyword: smtpname) @@ -507,9 +504,9 @@ you will lose mail. .B \-\-lmtp (Keyword: lmtp) Cause delivery via LMTP (Local Mail Transfer Protocol). A service -port \fImust\fR be explicitly specified (with a slash suffix) on each -host in the smtphost hunt list if this option is selected; the -default port 25 will (in accordance with RFC 2033) not be accepted. +host and port \fBmust\fR be explicitly specified on each host in the +smtphost hunt list (see above) if this option is selected; the default +port 25 will (in accordance with RFC 2033) not be accepted. .TP .B \-\-bsmtp <filename> (keyword: bsmtp) @@ -2413,9 +2410,6 @@ with the plugin option. .PP The 'principal' option only handles Kerberos IV, not V. .PP -The --smtphost defaults may not be adequate for your system. In doubt, -specify this option explicitly to set your forward destination. -.PP Send comments, bug reports, gripes, and the like to the fetchmail-devel list <fetchmail-devel@lists.berlios.de>. An HTML FAQ is available at the fetchmail home page; surf to |