aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-05-15 20:12:53 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-05-15 20:12:53 +0000
commitdea547a71036ae3445a5a612f6afd00b76ed721a (patch)
tree21526ebcd03d92a894cdb61b36d33ae56b8c5684 /fetchmail.c
parent3dd9a93bd23e0ad36e52ffd79efe2dcbdaf85272 (diff)
downloadfetchmail-dea547a71036ae3445a5a612f6afd00b76ed721a.tar.gz
fetchmail-dea547a71036ae3445a5a612f6afd00b76ed721a.tar.bz2
fetchmail-dea547a71036ae3445a5a612f6afd00b76ed721a.zip
Add multiple-folder support.
svn path=/trunk/; revision=1012
Diffstat (limited to 'fetchmail.c')
-rw-r--r--fetchmail.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/fetchmail.c b/fetchmail.c
index fbc16d9a..3bea5ab4 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -650,6 +650,10 @@ static int load_params(int argc, char **argv, int optind)
if (ctl->server.envelope == (char *)NULL)
ctl->server.envelope = "X-Envelope-To:";
+ /* if no folders were specified, set up the null one as default */
+ if (!ctl->mailboxes)
+ save_str(&ctl->mailboxes, -1, (char *)NULL);
+
/* sanity checks */
if (ctl->server.port < 0)
{
@@ -849,6 +853,17 @@ void dump_params (struct query *ctl)
putchar('\n');
}
+ if (!ctl->mailboxes->id)
+ printf(" Default mailbox selected.\n");
+ else
+ {
+ struct idlist *idp;
+
+ printf(" Selected mailboxes are:");
+ for (idp = ctl->mailboxes; idp; idp = idp->next)
+ printf(" %s", idp->id);
+ printf("\n");
+ }
printf(" %s messages will be retrieved (--all %s).\n",
ctl->fetchall ? "All" : "Only new",
ctl->fetchall ? "on" : "off");