diff options
-rw-r--r-- | fetchmail.man | 11 | ||||
-rw-r--r-- | rcfile_l.l | 1 | ||||
-rw-r--r-- | rcfile_y.y | 13 | ||||
-rw-r--r-- | sample.rcfile | 1 |
4 files changed, 22 insertions, 4 deletions
diff --git a/fetchmail.man b/fetchmail.man index 5037924c..afe2240e 100644 --- a/fetchmail.man +++ b/fetchmail.man @@ -431,6 +431,7 @@ Legal server options are: port authenticate (or auth) timeout + aka Legal user options are @@ -451,7 +452,15 @@ Legal user options are norewrite .PP All options correspond to the obvious command-line arguments except -three: `is', `to', and `password' +four: `aka', `is', `to', and `password'. +.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 +optimization hack that allows you to trade space for speed. When +.IR fetchmail , +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 `is' or `to' keywords associate the following local (client) name(s) (or server-name to client-name mappings separated by =) with @@ -25,6 +25,7 @@ defaults { return DEFAULTS; } server { return POLL; } poll { return POLL; } skip { return SKIP; } +aka { return AKA; } proto(col)? { return PROTOCOL; } port { return PORT; } auth(enticate)? { return AUTHENTICATE; } @@ -41,7 +41,7 @@ static void prc_reset(); char *sval; } -%token DEFAULTS POLL SKIP PROTOCOL AUTHENTICATE TIMEOUT KPOP KERBEROS +%token DEFAULTS POLL SKIP AKA PROTOCOL AUTHENTICATE TIMEOUT KPOP KERBEROS %token USERNAME PASSWORD FOLDER SMTPHOST MDA IS HERE THERE TO MAP LIMIT %token SET BATCHLIMIT %token <proto> PROTO @@ -86,7 +86,12 @@ serverspecs : /* EMPTY */ | serverspecs serv_option ; -serv_option : PROTOCOL PROTO {current.protocol = $2;} +alias_list : STRING {save_uid(¤t.aka, -1, $1);} + | alias_list STRING {save_uid(¤t.aka, -1, $2);} + ; + +serv_option : AKA alias_list + | PROTOCOL PROTO {current.protocol = $2;} | PROTOCOL KPOP { current.protocol = P_POP3; current.authenticate = A_KERBEROS; @@ -247,6 +252,7 @@ static void prc_reset(void) { char savename[HOSTLEN+1]; int saveport, saveproto, saveauth, saveskip; + struct idlist *saveaka; /* * Purpose of this code is to initialize the new server block, but @@ -259,6 +265,7 @@ static void prc_reset(void) saveproto = current.protocol; saveauth = current.authenticate; saveskip = current.skip; + saveaka = current.aka; memset(¤t, '\0', sizeof(current)); @@ -266,6 +273,7 @@ static void prc_reset(void) current.protocol = saveproto; current.authenticate = saveauth; current.skip = saveskip; + current.aka = saveaka; } struct query *hostalloc(init) @@ -342,7 +350,6 @@ void optmerge(struct query *h2, struct query *h1) FLAG_MERGE(timeout); FLAG_MERGE(limit); #undef FLAG_MERGE - } /* easier to do this than cope with variations in where the library lives */ diff --git a/sample.rcfile b/sample.rcfile index 1f2f58fc..4f41c9de 100644 --- a/sample.rcfile +++ b/sample.rcfile @@ -25,6 +25,7 @@ # port -- must be followed by a TCP/IP port number # authenticate (or auth) -- must be followed by an authentication type # timeout -- must be followed by a numeric timeout value +# aka -- must be followed by one or more server aliases # # username (or user) -- must be followed by a name # is -- must be followed by one or more names |