]> Pileus Git - ~andy/fetchmail/commitdiff
Lose the `received' option; we now say `no envelope'.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 17 Feb 1997 04:38:39 +0000 (04:38 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 17 Feb 1997 04:38:39 +0000 (04:38 -0000)
svn path=/trunk/; revision=893

NEWS
driver.c
fetchmail.c
fetchmail.h
fetchmail.man
rcfile_l.l
rcfile_y.y
sample.rcfile

diff --git a/NEWS b/NEWS
index 9646ad8c779870245318681832a08f0b53448433..1f255104495ff18c9ce1edd577990e47522ebf6d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,11 @@ features --
 
 * New Makefile production to generate an RPM.
 
+* The `no received' option of 3.4 is gone.  Instead, say `no envelope'. 
+  This suppresses all attempts to extract an envelope address and route
+  based on it.  If you set `no envelope' in the defaults entry it is possible
+  to undo that in individual entries by using `envelope <string>'.
+
 bugs --
 
 * Yet another fix to the password-shrouding logic.
index 8ae41e13e8c318cd5ee7121c33df9413a3094d78..3960429fdf90573ca5f4daa3342a346af3e7196d 100644 (file)
--- a/driver.c
+++ b/driver.c
@@ -507,7 +507,7 @@ char *realname;             /* real name of host */
        else if (!strncasecmp("To:", line, 3))
            to_offs = (line - headers);
 
-       else if (ctl->server.received && env_offs == -1
+       else if (ctl->server.envelope != STRING_DISABLED && env_offs == -1
                 && !strncasecmp(ctl->server.envelope,
                                                line,
                                                strlen(ctl->server.envelope)))
@@ -523,7 +523,7 @@ char *realname;             /* real name of host */
            ctt_offs = (line - headers);
 
 #ifdef HAVE_RES_SEARCH
-       else if (ctl->server.received && MULTIDROP(ctl) && !received_for && !strncasecmp("Received:", line, 9))
+       else if (ctl->server.envelope != STRING_DISABLED && MULTIDROP(ctl) && !received_for && !strncasecmp("Received:", line, 9))
            received_for = parse_received(ctl, line);
 #endif /* HAVE_RES_SEARCH */
     }
index 2522bbf9d1b0a877b429a63071c6f825838bfc3f..417f042433c9ce154304be5af9453bfe2d3d896b 100644 (file)
@@ -652,7 +652,6 @@ static int load_params(int argc, char **argv, int optind)
            DEFAULT(ctl->rewrite, TRUE);
            DEFAULT(ctl->stripcr, (ctl->mda != (char *)NULL)); 
            DEFAULT(ctl->server.dns, TRUE);
-           DEFAULT(ctl->server.received, TRUE);
 #undef DEFAULT
 
            /* plug in the semi-standard way of indicating a mail address */
@@ -906,12 +905,12 @@ void dump_params (struct query *ctl)
        printf("  DNS lookup for multidrop addresses is %sabled.\n",
               ctl->server.dns ? "en" : "dis",
               ctl->server.dns ? "off" : "on");
-       printf("  Received-line parsing for envelope addresses is %sabled.\n",
-              ctl->server.received ? "en" : "dis",
-              ctl->server.received ? "off" : "on");
 
        if (count > 1)
-           printf("  Envelope header is assumed to be: %s\n", ctl->server.envelope);
+           if (ctl->server.envelope == STRING_DISABLED)
+               printf("  Envelope-address routing is disabled\n");
+           else
+               printf("  Envelope header is assumed to be: %s\n", ctl->server.envelope);
     }
 #ifdef linux
     if (ctl->server.interface)
index 2cc6da0ac8ee17b2d0e40f64ad2ba60703211ba8..eed7b1ea2d5f5f19863736eb3d4de2e221d8cf89 100644 (file)
@@ -75,7 +75,6 @@ struct hostdata               /* shared among all user connections to given server */
     char *envelope;
     int skip;
     int dns;
-    int received;
 
 #ifdef linux
     char *interface;
@@ -246,3 +245,5 @@ int yylex(void);
 
 #define FALSE  0
 #define TRUE   1
+
+#define STRING_DISABLED        (char *)-1
index 13e94071e6500b1a36fd9898e49d6444f7c8f934..fcd5c350b61a4a44a08fc7d88545d658a6e39450 100644 (file)
@@ -607,14 +607,13 @@ Legal user options are
     rewrite
     stripcr
     dns
-    received
     no keep
     no flush
     no fetchall
     no rewrite
     no stripcr
     no dns
-    no received
+    no envelope
     limit
     batchlimit
     fetchlimit
@@ -623,7 +622,7 @@ Legal user options are
 All options correspond to the obvious command-line arguments except
 the following: `aka', `is', `to', `dns'/`no dns', `password',
 \&`preconnect', `localdomains', `stripcr'/`no stripcr' and
-\&`received/no received'.
+\&`no received'.
 .PP
 The `is' or `to' keywords associate the following local (client)
 name(s) (or server-name to client-name mappings separated by =) with
@@ -670,9 +669,12 @@ name matches a declared local doman, that address is passed through
 to the listener or MDA unaltered (local-name mappings are \fInot\fR
 applied).
 .PP
-If you are using `localdomains', you may also need to specify 
-\&`no received', which disables \fIfetchmail\fR's normal attempt
-to deduce an envelope address from the Received line.
+If you are using `localdomains', you may also need to specify \&`no
+envelope', which disables \fIfetchmail\fR's normal attempt to deduce
+an envelope address from the Received line or X-Envelope-To header or
+whatever header has been previously set by `envelope'.  If you set `no
+envelope' in the defaults entry it is possible to undo that in
+individual entries by using `envelope <string>'.
 .PP
 The \fBpassword\fR option requires a string argument, which is the password
 to be used with the entry's server.
index 4b1d96032fc07461dc40c27041b162667249c1de..ef280e1aff9a8cd8ce1661b5e884d683fec08520 100644 (file)
@@ -61,7 +61,6 @@ fetchall      { return FETCHALL; }
 rewrite                { return REWRITE; }
 stripcr                { return STRIPCR; }
 dns            { return DNS; }
-received       { return RECEIVED; }
 
 limit          { return LIMIT; }
 
index fdc295d527fac258c314dd0227d2aacda98dcccd..06f3cd23d0cd84125c5444897bde94c7b022ddcf 100644 (file)
@@ -48,7 +48,7 @@ static void user_reset();
 %token <proto> PROTO
 %token <sval>  STRING
 %token <number> NUMBER
-%token NO KEEP FLUSH FETCHALL REWRITE STRIPCR DNS PORT RECEIVED
+%token NO KEEP FLUSH FETCHALL REWRITE STRIPCR DNS PORT
 
 %%
 
@@ -123,9 +123,8 @@ serv_option : AKA alias_list
 #endif /* linux */
                                        }
                | DNS                   {current.server.dns = FLAG_TRUE;}
-               | RECEIVED              {current.server.received = FLAG_TRUE;}
                | NO DNS                {current.server.dns = FLAG_FALSE;}
-               | NO RECEIVED           {current.server.received = FLAG_FALSE;}
+               | NO ENVELOPE           {current.server.envelope = STRING_DISABLED;}
                ;
 
 /*
index 45f4170e385c8936d2b4a8615731cc273c27d6ab..ded965c89713d46fc0f5f08d08b3be5d242a1423 100644 (file)
 #   rewrite
 #   stripcr
 #   dns
-#   received
 #   no keep
 #   no flush
 #   no fetchall
 #   no rewrite
 #   no stripcr
 #   no dns
-#   no received
+#   no envelope
 #   limit                     -- must be followed by numeric size limit
 #   fetchlimit                -- must be followed by numeric msg fetch limit
 #   batchlimit                -- must be followed by numeric SMTP batch limit