diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-01-09 01:14:01 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-01-09 01:14:01 +0000 |
commit | 6feef116d81caa80cc12ebdfc041df358418f2f1 (patch) | |
tree | 5a4f4862be2963bf097d2dc0d09c2a8846642a82 | |
parent | d167887cedea1432f4254d5ab6b9d02171aca258 (diff) | |
download | fetchmail-6feef116d81caa80cc12ebdfc041df358418f2f1.tar.gz fetchmail-6feef116d81caa80cc12ebdfc041df358418f2f1.tar.bz2 fetchmail-6feef116d81caa80cc12ebdfc041df358418f2f1.zip |
We can now set the envelope header from the command line.
svn path=/trunk/; revision=723
-rw-r--r-- | fetchmail.man | 19 | ||||
-rw-r--r-- | options.c | 42 |
2 files changed, 35 insertions, 26 deletions
diff --git a/fetchmail.man b/fetchmail.man index 27123ab3..e035af83 100644 --- a/fetchmail.man +++ b/fetchmail.man @@ -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 @@ -32,23 +32,24 @@ #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); |