]> Pileus Git - ~andy/fetchmail/commitdiff
We can now set the envelope header from the command line.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 9 Jan 1997 01:14:01 +0000 (01:14 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 9 Jan 1997 01:14:01 +0000 (01:14 -0000)
svn path=/trunk/; revision=723

fetchmail.man
options.c

index 27123ab3060c394874cc0924319d275193e9c4dd..e035af83e45d7609b5010de9f2c02a9e22a7c2d9 100644 (file)
@@ -236,6 +236,13 @@ nonzero size will prevent these delays.
 Limit the number of messages accepted from a given server in a single
 poll.  By default there is no limit. 
 .TP
+.B -E, --envelope
+This option changes the header 
+.I fetchmail
+assumes will carry a copy of the mail's envelope address.  Normally
+this is `X-Envelope-To' but as this header is not standard, practice
+varies. See the discussion of multidrop address handling below.
+.TP
 .B \-V, --version
 Displays the version information for your copy of 
 .I fetchmail.
@@ -410,7 +417,7 @@ or --nodetach option suppresses detachment of the daemon process
 from its control terminal.  This is primarily useful for debugging.
 .PP
 Note that while running in daemon mode, transient errors (such as DNS
-failures or sendmail delivery refusals) effectively force the fetchall
+failures or sendmail delivery refusals) may force the fetchall
 option on for the duration of the next polling cycle.
 This is a robustness feature.  It means that if a message is fetched
 (and thus marked seen by the mailserver) but not delivered locally
@@ -544,7 +551,7 @@ Legal user options are
     syslog
 .PP
 All options correspond to the obvious command-line arguments except
-the following: `aka', `is', `to', `password', `envelope', and `preconnect'.
+the following: `aka', `is', `to', `password', and `preconnect'.
 .PP
 The `aka' option is for use with multidrop mailboxes.  It allows you
 to pre-declare a list of DNS aliases for a server.  This is an
@@ -554,12 +561,6 @@ while processing a multidrop mailbox, grovels through message headers
 looking for names of the mailserver, pre-declaring common ones can
 save it from having to do DNS lookups.
 .PP
-The `envelope' option changes the header 
-.I fetchmail
-assumes will carry a copy of the mail's envelope address.  Normally
-this is `X-Envelope-To' but as this header is not standard practice
-varies. See the discussion of multidrop address handling below.
-.PP
 The `is' or `to' keywords associate the following local (client)
 name(s) (or server-name to client-name mappings separated by =) with
 the mailserver user name in the entry.  If an is/to list has `*' as
@@ -793,7 +794,7 @@ than one recipient.
 Alternatively, some SMTP listeners and/or mail servers insert a header
 in each message containing a copy of the envelope addresses.  This
 header (when it exists) is often `X-Envelope-To'.  Fetchmail's
-assumption about this can be changed with the `envelope' option.
+assumption about this can be changed with the -E or `envelope' option.
 .SH EXIT CODES
 To facilitate the use of 
 .I fetchmail
index 4c02d584b3ca3f063064aeb5e69adb22f38578b0..7cfb0cdadbaefc41309780bbf4e9ea10a8126eae 100644 (file)
--- a/options.c
+++ b/options.c
 #define LA_PORT                14
 #define LA_AUTHENTICATE        15
 #define LA_TIMEOUT     16
-#define LA_USERNAME    17
-#define LA_ALL          18
-#define LA_KILL                19
-#define        LA_KEEP         20
-#define LA_FLUSH        21
-#define LA_NOREWRITE   22
-#define LA_LIMIT       23
-#define LA_REMOTEFILE  24
-#define LA_SMTPHOST    25
-#define LA_BATCHLIMIT  26
-#define LA_FETCHLIMIT  27
-#define LA_MDA         28
-#define LA_INTERFACE    29
-#define LA_MONITOR      30
-#define LA_YYDEBUG     31
+#define LA_ENVELOPE    17
+#define LA_USERNAME    18
+#define LA_ALL          19
+#define LA_KILL                20
+#define        LA_KEEP         21
+#define LA_FLUSH        22
+#define LA_NOREWRITE   23
+#define LA_LIMIT       24
+#define LA_REMOTEFILE  25
+#define LA_SMTPHOST    26
+#define LA_BATCHLIMIT  27
+#define LA_FETCHLIMIT  28
+#define LA_MDA         29
+#define LA_INTERFACE    30
+#define LA_MONITOR      31
+#define LA_YYDEBUG     32
 
-static char *shortoptions = "?Vcsvd:NqL:f:i:p:P:A:t:u:akKFnl:r:S:b:B:m:I:M:y";
+static char *shortoptions = "?Vcsvd:NqL:f:i:p:P:A:t:E:u:akKFnl:r:S:b:B:m:I:M:y";
 static struct option longoptions[] = {
   {"help",     no_argument,       (int *) 0, LA_HELP        },
   {"version",   no_argument,       (int *) 0, LA_VERSION     },
@@ -72,6 +73,7 @@ static struct option longoptions[] = {
   {"port",     required_argument, (int *) 0, LA_PORT        },
   {"auth",     required_argument, (int *) 0, LA_AUTHENTICATE},
   {"timeout",  required_argument, (int *) 0, LA_TIMEOUT     },
+  {"envelope", required_argument, (int *) 0, LA_ENVELOPE    },
 
   {"user",     required_argument, (int *) 0, LA_USERNAME    },
   {"username",  required_argument, (int *) 0, LA_USERNAME    },
@@ -204,13 +206,18 @@ struct query *ctl;        /* option record to be initialized */
            }
            break;
        case 't':
+       case LA_TIMEOUT:
            ctl->timeout = atoi(optarg);
            break;
+       case 'E':
+       case LA_ENVELOPE:
+           ctl->envelope = xstrdup(optarg);
+           break;
+
        case 'u':
        case LA_USERNAME:
            strncpy(ctl->remotename,optarg,sizeof(ctl->remotename)-1);
            break;
-
        case 'a':
        case LA_ALL:
            ctl->fetchall = TRUE;
@@ -323,6 +330,7 @@ struct query *ctl;  /* option record to be initialized */
        fputs("  -P, --port        TCP/IP service port to connect to\n",stderr);
        fputs("  -A, --auth        authentication type (password or kerberos)\n",stderr);
        fputs("  -t, --timeout     server nonresponse timeout\n",stderr);
+       fputs("  -E, --envelope    envelope address header\n",stderr);
 
        fputs("  -u, --username    specify users's login on server\n", stderr);
        fputs("  -a, --all         retrieve old and new messages\n", stderr);