aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS7
-rw-r--r--fetchmail.c3
-rw-r--r--fetchmail.h2
-rw-r--r--fetchmail.man5
-rw-r--r--imap.c2
-rw-r--r--options.c2
-rw-r--r--pop2.c4
-rw-r--r--pop3.c2
-rw-r--r--rcfile_l.l6
-rw-r--r--rcfile_y.y9
-rw-r--r--sample.rcfile8
11 files changed, 32 insertions, 18 deletions
diff --git a/NEWS b/NEWS
index 57ed6f14..da9a1f52 100644
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,13 @@ fetchmail-1.6 ():
* Fix bug that prevented SMTP from being specified on the defaults line.
+* Changes in .fetchmailrc syntax: The token `remotefolder' no longer
+ exists; it has been replaced by `mailbox'. The token `remote' no
+ longer stands for `remotefolder' but for `remotename', a synonym for
+ `username'. The purpose of these changes (which should only affect
+ IMAP and POP2 users setting up for non-default mailboxes) is to prepare
+ for syntax supporting multiple user queries per host.
+
* Allow program to run with no .fetchmailrc file again.
fetchmail-1.5 (Thu Oct 3 04:35:15 EDT 1996):
diff --git a/fetchmail.c b/fetchmail.c
index fa3802f2..ecf398e4 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -167,7 +167,6 @@ char **argv;
else
printf(" and %s\n", rcfile);
for (hostp = hostlist; hostp; hostp = hostp->next) {
- printf("Options for host %s:\n", hostp->servername);
dump_params(hostp);
if (outlevel == O_VERBOSE)
printf(" Lockfile at %s\n", tmpbuf);
@@ -383,6 +382,8 @@ static int showversioninfo()
int dump_params (queryctl)
struct hostrec *queryctl;
{
+ printf("Options for %s retrieving from %s:\n",
+ hostp->localname, hostp->servername);
if (queryctl->skip || outlevel == O_VERBOSE)
printf(" This host will%s be queried when no host is specified.\n",
queryctl->skip ? " not" : "");
diff --git a/fetchmail.h b/fetchmail.h
index 56d04747..ef49b23d 100644
--- a/fetchmail.h
+++ b/fetchmail.h
@@ -57,7 +57,7 @@ struct hostrec
char localname [USERNAMELEN+1];
char remotename [USERNAMELEN+1];
char password [PASSWORDLEN+1];
- char remotefolder [FOLDERLEN];
+ char mailbox [FOLDERLEN];
char smtphost[HOSTLEN+1];
char mda [MDALEN+1];
int protocol;
diff --git a/fetchmail.man b/fetchmail.man
index b650ce57..2d146b10 100644
--- a/fetchmail.man
+++ b/fetchmail.man
@@ -296,9 +296,12 @@ Legal keywords are:
server
protocol (or proto)
+ localname (or local)
+ username (or user)
+ remotename (or remote)
username (or user)
password (or pass)
- remotefolder (or remote)
+ mailbox
smtphost (or smtp)
mda
keep
diff --git a/imap.c b/imap.c
index 07ef852b..ac13f068 100644
--- a/imap.c
+++ b/imap.c
@@ -101,7 +101,7 @@ int *countp;
/* find out how many messages are waiting */
ok = gen_transact(socket,
"SELECT %s",
- queryctl->remotefolder[0] ? queryctl->remotefolder : "INBOX");
+ queryctl->mailbox[0] ? queryctl->mailbox : "INBOX");
if (ok != 0)
return(ok);
diff --git a/options.c b/options.c
index 29abbe03..b2369cfc 100644
--- a/options.c
+++ b/options.c
@@ -172,7 +172,7 @@ struct hostrec *queryctl;
break;
case 'r':
case LA_REMOTEFILE:
- strncpy(queryctl->remotefolder,optarg,sizeof(queryctl->remotefolder)-1);
+ strncpy(queryctl->mailbox,optarg,sizeof(queryctl->mailbox)-1);
break;
case 'm':
case LA_MDA:
diff --git a/pop2.c b/pop2.c
index 2e808b2d..bccc1b6e 100644
--- a/pop2.c
+++ b/pop2.c
@@ -82,9 +82,9 @@ int *countp;
return(PS_ERROR);
/* maybe the user wanted a non-default folder */
- if (queryctl->remotefolder[0])
+ if (queryctl->mailbox[0])
{
- int ok = gen_transact(socket, "FOLD %s", queryctl->remotefolder);
+ int ok = gen_transact(socket, "FOLD %s", queryctl->mailbox);
if (ok != 0)
return(ok);
diff --git a/pop3.c b/pop3.c
index f10043ae..65849b80 100644
--- a/pop3.c
+++ b/pop3.c
@@ -222,7 +222,7 @@ int doPOP3 (queryctl)
/* retrieve messages using POP3 */
struct hostrec *queryctl;
{
- if (queryctl->remotefolder[0]) {
+ if (queryctl->mailbox[0]) {
fprintf(stderr,"Option --remote is not supported with POP3\n");
return(PS_SYNTAX);
}
diff --git a/rcfile_l.l b/rcfile_l.l
index e4c70f93..cba1c5ea 100644
--- a/rcfile_l.l
+++ b/rcfile_l.l
@@ -26,9 +26,11 @@ int prc_lineno = 1;
defaults { return KW_DEFAULTS; }
server { return KW_SERVER; }
proto(col)? { return KW_PROTOCOL; }
-user(name)? { return KW_USERNAME; }
+local(name)? { return KW_LOCALNAME; }
+user(name)? { return KW_REMOTENAME; }
+remote(name)? { return KW_REMOTENAME; }
pass(word)? { return KW_PASSWORD; }
-remote(folder)? { return KW_REMOTEFOLDER; }
+mailbox { return KW_MAILBOX; }
smtp(host)? { return KW_SMTPHOST; }
mda { return KW_MDA; }
keep { yylval.flag = FLAG_TRUE; return KW_KEEP; }
diff --git a/rcfile_y.y b/rcfile_y.y
index a899315d..94b81d8b 100644
--- a/rcfile_y.y
+++ b/rcfile_y.y
@@ -29,8 +29,8 @@ int yydebug; /* in case we didn't generate with -- debug */
char *sval;
}
-%token KW_SERVER KW_PROTOCOL KW_USERNAME KW_PASSWORD
-%token KW_REMOTEFOLDER KW_SMTPHOST KW_MDA KW_DEFAULTS
+%token KW_SERVER KW_PROTOCOL KW_LOCALNAME KW_REMOTENAME KW_PASSWORD
+%token KW_MAILBOX KW_SMTPHOST KW_MDA KW_DEFAULTS
%token <proto> KW_PROTO
%token <sval> PARAM_STRING
%token <flag> KW_KEEP KW_FLUSH KW_FETCHALL KW_REWRITE KW_PORT KW_SKIP
@@ -63,9 +63,10 @@ server_options: serv_option_clause
serv_option_clause:
KW_PROTOCOL KW_PROTO {prc_setproto($2);}
- | KW_USERNAME PARAM_STRING {prc_remotename($2);}
+ | KW_LOCALNAME PARAM_STRING {prc_localname($2);}
+ | KW_REMOTENAME PARAM_STRING {prc_remotename($2);}
| KW_PASSWORD PARAM_STRING {prc_setpassword($2);}
- | KW_REMOTEFOLDER PARAM_STRING {prc_setremote($2);}
+ | KW_MAILBOX PARAM_STRING {prc_setmailbox($2);}
| KW_SMTPHOST PARAM_STRING {prc_setsmtphost($2);}
| KW_MDA PARAM_STRING {prc_setmda($2);}
| KW_KEEP {prc_setkeep($1==FLAG_TRUE);}
diff --git a/sample.rcfile b/sample.rcfile
index e8d757ea..c854af78 100644
--- a/sample.rcfile
+++ b/sample.rcfile
@@ -21,10 +21,11 @@
# Legal keywords are
# server
# protocol (or proto)
+# localname (or local)
# username (or user)
+# remotename (or remote)
# password (or pass)
-# remotefolder (or remote)
-# localfolder (or local)
+# mailbox
# smtphost (or smtp)
# mda
# keep
@@ -66,5 +67,4 @@ server other.provider.net proto pop2 user John.Smith password My^Hat
server pop.provider.net \
proto pop3 \
user jsmith \
- pass secret1 \
- localfolder ~/mbox
+ pass secret1