of run, so DNS does less work. During a run, cache host matches on the
aka list so no potential alias has to be DNS-checked more than once.
* Try to use envelope From. If that fails, fall back on calling-user.
-* Added FAQ file
* Added `logfile' keyword to rc syntax.
* We now use X-Envelope-To headers.
+* Added `*' as a wildcard option for multidrop to ... here
+* Added FAQ file
fetchmail-2.0 (Mon Nov 18 00:32:17 EST 1996):
}
lname = idpair_find(&ctl->localnames, cp);
+ if (!lname && ctl->wildcard)
+ lname = cp;
+
if (lname != (char *)NULL)
{
if (outlevel == O_VERBOSE)
count,
(count == 1 && !strcmp(ctl->localnames->id, user)) ? " (by default)" : "");
if (outlevel == O_VERBOSE)
+ {
for (idp = ctl->localnames; idp; idp = idp->next)
if (idp->val.id2)
fprintf(stderr, "\t%s -> %s\n", idp->id, idp->val.id2);
else
fprintf(stderr, "\t%s\n", idp->id);
+ if (ctl->wildcard)
+ fputs("*\n", stderr);
+ }
}
if (ctl->protocol > P_POP2)
/* per-host data */
char servername [HOSTLEN+1];
struct idlist *localnames;
+ int wildcard; /* true if unmatched names should be passed through */
int protocol;
int port;
int authenticate;
#endif /* HAVE_GETHOSTBYNAME */
};
-#define MULTIDROP(ctl) ((ctl)->localnames && (ctl)->localnames->next)
+#define MULTIDROP(ctl) (ctl->wildcard || \
+ ((ctl)->localnames && (ctl)->localnames->next))
struct method
{
.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.
+the mailserver user name in the entry. If an is/to list has `*' as
+its last name, unrecognized names are simply passed through.
.PP
A single local name can be used to support redirecting your mail when
your username on the client machine is different from your name on the
there { return THERE; }
to { return TO; }
= { return MAP; }
+"*" { return WILDCARD; }
keep { yylval.flag = FLAG_TRUE; return KEEP; }
flush { yylval.flag = FLAG_TRUE; return FLUSH; }
}
%token DEFAULTS POLL SKIP AKA PROTOCOL AUTHENTICATE TIMEOUT KPOP KERBEROS
-%token USERNAME PASSWORD FOLDER SMTPHOST MDA IS HERE THERE TO MAP LIMIT
+%token USERNAME PASSWORD FOLDER SMTPHOST MDA LIMIT
+%token IS HERE THERE TO MAP WILDCARD
%token SET BATCHLIMIT LOGFILE
%token <proto> PROTO
%token <sval> STRING
/* future global options should also have the form SET <name> <value> */
statement : SET BATCHLIMIT MAP NUMBER {batchlimit = $4;}
- | SET LOGFILE STRING {logfile = xstrdup($3);}
+ | SET LOGFILE MAP STRING {logfile = xstrdup($4);}
/*
* The way the next two productions are written depends on the fact that
| user1opts user_option
;
+localnames : WILDCARD {current.wildcard = TRUE;}
+ | mapping_list {current.wildcard = FALSE;}
+ | mapping_list WILDCARD {current.wildcard = TRUE;}
+ ;
+
mapping_list : mapping
| mapping_list mapping
;
{save_id_pair(¤t.localnames, $1, $3);}
;
-user_option : TO mapping_list HERE
- | TO mapping_list
- | IS mapping_list HERE
- | IS mapping_list
+user_option : TO localnames HERE
+ | TO localnames
+ | IS localnames HERE
+ | IS localnames
| IS STRING THERE {strcpy(current.remotename, $2);}
| PASSWORD STRING {strcpy(current.password, $2);}