aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS8
-rw-r--r--driver.c27
-rw-r--r--fetchmail-FAQ.html58
-rw-r--r--fetchmail.c53
-rw-r--r--fetchmail.man18
5 files changed, 99 insertions, 65 deletions
diff --git a/NEWS b/NEWS
index 7c4256ee..fa390cb7 100644
--- a/NEWS
+++ b/NEWS
@@ -19,11 +19,19 @@
Release Notes:
------------------------------------------------------------------------------
+fetchmail-4.0.6 ()
+* Changed semantics of `via' and `poll <name>' to be more orthogonal.
+
+WARNING: If you are running multidrop, READ FAQ ITEM F1 NOW!
+There are 255 people on the fetchmail-friends list.
+
fetchmail-4.0.5 (Wed Jul 30 10:27:25 EDT 1997)
* Increased %o in the Lex source to cope with Ultrix lex.
* RPMs are now built with --without-OPIE to avoid validation problems.
* Channge in computation of true name to avoid HELO (null) bug.
+There are 255 people on the fetchmail-friends list.
+
fetchmail-4.0.4 (Mon Jul 28 23:38:20 EDT 1997)
* Overhauled the build machinery.
* The `no envelope' option now suppresses parsing of Received lines.
diff --git a/driver.c b/driver.c
index 3c48b66c..11d68982 100644
--- a/driver.c
+++ b/driver.c
@@ -114,36 +114,26 @@ static int is_host_alias(const char *name, struct query *ctl)
ctl->server.lead_server ? ctl->server.lead_server : &ctl->server;
/*
- * The first three checks are optimizations that will catch a good
+ * The first two checks are optimizations that will catch a good
* many cases.
*
- * (1) check against the poll label the user specified. Odds are
- * good this will either be the mailserver's FQDN or a suffix of
+ * (1) check against the `true name' deduced from the poll label
+ * and the via option (if present) at the beginning of the poll cycle.
+ * Odds are good this will either be the mailserver's FQDN or a suffix of
* it with the mailserver's domain's default host name omitted.
*
* (2) Then check the rest of the `also known as'
* cache accumulated by previous DNS checks. This cache is primed
* by the aka list option.
*
- * (3) Check the `via' or true host name if present, just in case
- * the poll name is a label for one of a couple of different
- * configurations and the real server name is here.
- *
- * (4) Finally check against the mailserver's FQDN, in case
- * it's not the same as the declared hostname.
- *
* Any of these on a mail address is definitive. Only if the
* name doesn't match any is it time to call the bind library.
* If this happens odds are good we're looking at an MX name.
*/
- if (strcmp(lead_server->pollname, name) == 0)
+ if (strcmp(lead_server->truename, name) == 0)
return(TRUE);
else if (str_in_list(&lead_server->akalist, name))
return(TRUE);
- else if (ctl->server.via && strcmp(name, ctl->server.via) == 0)
- return(TRUE);
- else if (strcmp(name, ctl->server.truename) == 0)
- return(TRUE);
else if (!ctl->server.dns)
return(FALSE);
@@ -397,6 +387,13 @@ int smtp_open(struct query *ctl)
* In fact this code relies on the RFC1123 requirement that the
* SMTP listener must accept messages even if verification of the
* HELO name fails (RFC1123 section 5.2.5, paragraph 2).
+ *
+ * How we compute the true mailhost name to pass to the
+ * listener doesn't affect behavior on RFC1123- violating
+ * listener that check for name match; we're going to lose
+ * on those anyway because we can never give them a name
+ * that matches the local machine fetchmail is running on.
+ * What it will affect is the listener's logging.
*/
/* if no socket to this host is already set up, try to open ESMTP */
diff --git a/fetchmail-FAQ.html b/fetchmail-FAQ.html
index 4b1f48c1..f297811c 100644
--- a/fetchmail-FAQ.html
+++ b/fetchmail-FAQ.html
@@ -51,7 +51,7 @@ http://www.ccil.org/~esr</a>.<P>
<h1>Fetchmail configuration file grammar questions:</h1>
-<a href="#F1">F1. Why does my .fetchmailrc from 3.9 or earlier no longer work?</a><br>
+<a href="#F1">F1. Why does my old .fetchmailrc no longer work?</a><br>
<a href="#F2">F2. The .fetchmailrc parser won't accept my all-numeric user name.</a><br>
<a href="#F3">F3. The .fetchmailrc parser won't accept my host or username beginning with `no'.</a><br>
<a href="#F4">F4. I'm migrating from popclient. How do I need to modify my .poprc?</a><br>
@@ -224,11 +224,36 @@ If you're reading a non-HTML dump of this FAQ, you can find the paper
on the Web with a search for that title.<p>
<hr>
-<h2><a name="F1">F1. Why does my .fetchmailrc from 3.9 or earlier no longer work?</a></h2>
+<h2><a name="F1">F1. Why does my old .fetchmailrc file no longer work?</a></h2>
-Probably it's because you're using a .fetchmailrc that's
-written in the old popclient syntax without an explicit `username'
-keyword leading the first user entry attached to a server entry.<p>
+<h3>If your file predates 4.0.6:</h3>
+
+Just after the `<CODE>via</CODE>' option was introduced, I realized
+that the interactions between the `<CODE>via</CODE>',
+`<CODE>aka</CODE>', and `<CODE>localdomains</CODE>' options were out
+of control. Their behavior had become complex and confusing, so much so
+that I was no longer sure I understood it myself. Users were being
+unpleasantly surprised.<P>
+
+Rather than add more options or crock the code, I re-thought it. The
+redesign simplified the code and made the options more orthogonal, but
+may have broken some complex multidrop configurations.
+
+Any multidrop configurations that depended on the name just after the
+`<CODE>poll</CODE>' or `<CODE>skip</CODE>' keyword being still
+interpreted as a DNS name for address-matching purposes, even in the
+presence of a `<CODE>via</CODE>' option, will break.<P>
+
+It is theoretically possible that other unusual configurations (such
+as those using a non-FQDN poll name to generate Kerberos IV tickets) might
+also break; the old behavior was sufficiently murky that we can't be
+sure. If you think this has happened to you, contact the maintainer.<P>
+
+<h3>If your file predates 3.9:</h3>
+
+It could be because you're using a .fetchmailrc that's written in the
+old popclient syntax without an explicit `<CODE>username</CODE>'
+keyword leading the first user entry attached to a server entry.
This error can be triggered by having a user option such as `<CODE>keep</CODE>'
or `<CODE>fetchall</CODE>' before the first explicit username. For
@@ -239,17 +264,20 @@ poll openmail protocol pop3
keep user "Hal DeVore" there is hdevore here
</pre>
-the `<CODE>keep</CODE>' option will generate an entire user entry with the default
-username (the name of fetchmail's invoking user).<p>
+the `<CODE>keep</CODE>' option will generate an entire user entry with
+the default username (the name of fetchmail's invoking user).<p>
The popclient compatibility syntax was removed in 4.0. It complicated
the configuration file grammar and confused users.<p>
-Also, the `<CODE>interface</CODE>', `<CODE>monitor</CODE>' and
+<h3>If your file predates 2.8:</h3>
+
+The `<CODE>interface</CODE>', `<CODE>monitor</CODE>' and
`<CODE>batchlimit</CODE>' options changed after 2.8.<p>
-They used to be global options with `set' syntax like the batchlimit
-and logfile options. Now they're per-server options, like `protocol'.<p>
+They used to be global options with `<CODE>set</CODE>' syntax like the
+batchlimit and logfile options. Now they're per-server options, like
+`<CODE>protocol</CODE>'.<p>
If you had something like<p>
@@ -929,10 +957,12 @@ means it is unable to recognize hostname parts as being DNS names of
the mailserver, and indicates some kind of DNS configuration
problem either on the server or your client machine. <p>
-The easiest workaround is to write enough aka declarations to cover
-all of your mailserver's aliases, then say `no dns'. This will take
+The easiest workaround is to add a `<CODE>via</CODE>' option (if
+necessary) and add enough aka declarations to cover all of your
+mailserver's aliases, then say `<CODE>no dns</CODE>'. This will take
DNS out of the picture (though it means mail may be uncollected if
-it's sent to an alias of the server that you don't have listed). <p>
+it's sent to an alias of the mailserver that you don't have
+listed). <p>
It would be better to fix your DNS, however. DNS problems can hurt
you in lots of ways, for example by making your machines
@@ -1201,7 +1231,7 @@ biff n
to solve the problem system-wide.<P>
-$Id: fetchmail-FAQ.html,v 1.52 1997/07/30 14:26:35 esr Exp $<p>
+$Id: fetchmail-FAQ.html,v 1.53 1997/07/31 00:32:21 esr Exp $<p>
<HR>
<ADDRESS>Eric S. Raymond <A HREF="mailto:esr@thyrsus.com">&lt;esr@snark.thyrsus.com&gt;</A></ADDRESS>
diff --git a/fetchmail.c b/fetchmail.c
index d2f8c7ed..3f0ce69c 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -356,37 +356,34 @@ int main (int argc, char **argv)
continue;
#endif /* linux */
- /*
- * How we compute the true mailhost name to pass to the
- * listener doesn't affect behavior on RFC1123- violating
- * listener that check for name match; we're going to lose
- * on those anyway because we can never give them a name
- * that matches the local machine fetchmail is running on.
- * What it will affect is the listener's logging.
- *
- * If we have the mailserver's canonical FQDN that is clearly
- * the right thing to log. If we don't life is more complicated.
- * The problem is there are two clashing cases:
- *
- * (1) The poll name is a label. In that case we want the
- * log to show the via or true mailserver name.
- *
- * (2) The poll name is the true one, the via name is localhost.
- * This is going to be typical for ssh-using configurations.
- *
- * We're going to assume the via name is true unless it's
- * localhost.
- */
- if (ctl->server.via && strcmp(ctl->server.via, "localhost"))
- ctl->server.truename = xstrdup(ctl->server.via);
- else
- ctl->server.truename = xstrdup(ctl->server.pollname);
+ /*
+ *
+ * Compute the true name of the mailserver host.
+ * There are two clashing cases here:
+ *
+ * (1) The poll name is a label, possibly on one of several
+ * poll configurations for the same host. In this case
+ * the `via' option will be present and give the true name.
+ *
+ * (2) The poll name is the true one, the via name is
+ * localhost. This is going to be typical for ssh-using
+ * configurations.
+ *
+ * We're going to assume the via name is true unless it's
+ * localhost.
+ *
+ * Then, if we've got DNS, we'll try to canonicalize the name.
+ */
+ if (ctl->server.via && strcmp(ctl->server.via, "localhost"))
+ ctl->server.truename = xstrdup(ctl->server.via);
+ else
+ ctl->server.truename = xstrdup(ctl->server.pollname);
#ifdef HAVE_GETHOSTBYNAME
/*
- * This functions partly as an optimization and partly
- * as a probe to make sure our nameserver is still up.
- * The multidrop case (especially) needs it.
+ * This functions partly as a probe to make sure our
+ * nameserver is still up. The multidrop case
+ * (especially) needs it.
*/
if (ctl->server.preauthenticate==A_KERBEROS_V4 || MULTIDROP(ctl))
{
diff --git a/fetchmail.man b/fetchmail.man
index 10093502..492cac54 100644
--- a/fetchmail.man
+++ b/fetchmail.man
@@ -728,8 +728,9 @@ poll mailhost.net via localhost port 1234 with pop3:
This will override the argument of poll, which can simply be a
distinct label for the configuration. The poll name will still be the
one you would give on the command line to explicitly query this host.
-It will also still be used as a possible match in multidrop mode, in
-case it is (as in this case) the real host name.
+If the `via' name is `localhost', the poll name will also still be
+used as a possible match in multidrop mode; otherwise the `via' name
+will be used instead and the poll name will be purely a label.
.PP
The `interval' option (which takes a numeric argument) allows you to poll a
server less frequently than the basic poll interval. If you say
@@ -752,12 +753,13 @@ never does DNS lookups.
When there is more than one local name (or name mapping) the
\fIfetchmail\fR code does look at the Received, To, Cc, and Bcc
headers of retrieved mail (this is `multidrop mode'). It looks for
-addresses with hostname parts that match your `aka' or `localdomains'
-options, and usually also for hostname parts which DNS tells it are
-aliases of the mailserver. See the discussion of `dns',
-`localdomains', and `aka' for details on how matching addresses are
-handled. If \fIfetchmail\fR cannot match any mailserver usernames or
-localdomain addresses, the default recipient is the calling user.
+addresses with hostname parts that match your poll name or your `via',
+`aka' or `localdomains' options, and usually also for hostname parts
+which DNS tells it are aliases of the mailserver. See the discussion
+of `dns', `localdomains', and `aka' for details on how matching
+addresses are handled. If \fIfetchmail\fR cannot match any mailserver
+usernames or localdomain addresses, the default recipient is the
+calling user.
.PP
The `dns' option (normally on) controls the way addresses from
multidrop mailboxes are checked. On, it enables logic to check each