From dea547a71036ae3445a5a612f6afd00b76ed721a Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 15 May 1997 20:12:53 +0000 Subject: Add multiple-folder support. svn path=/trunk/; revision=1012 --- fetchmail.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'fetchmail.c') 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"); -- cgit v1.2.3