fetchmail-friends
[Top] [All Lists]

Re: [fetchmail] fetchmail bug -> fetchmailconf unable to parse configdump if antispam is not set

2002-10-31 09:38:50
Simon Child <Simon(_dot_)Child(_at_)GPUK(_dot_)net>:

Mandrake Linux 9.0 (stock install, with latest updates)

Fetchmail release 6.1.0+RPA+NTLM+SDPS+SSL+NLS

Fallback MDA: (none)

Linux simon.localdomain 2.4.19-16mdk #1 Fri Sep 20 18:15:05 CEST 2002 i686
unknown unknown GNU/Linux

Fetchmailconf version 1.43


Bug: fetchmailconf runs fine and makes the first .fetchmailrc

But on trying to rerun to amend configuration it dies:

"Can't read configuration output of fetchmail --configdump."


I traced this to an inability to execfile(tmpfile) about line 2042 of
fetchmailconf if the
output of configdump includes:

 'antispam':''

 in the user section, which it does if "listener spam-block codes" has not
been
set.

Would you please tell me whetheer or nit this patch solves the problem?

--- conf.c      2002/10/18 11:03:00     1.60
+++ conf.c      2002/10/31 16:26:19
@@ -395,18 +395,13 @@
 
        indent('\0');
        fprintf(stdout, "'antispam':'");
-       if (!ctl->antispam)
-           fputs("',\n", stdout);
-       else
+       for (idp = ctl->antispam; idp; idp = idp->next)
        {
-           for (idp = ctl->antispam; idp; idp = idp->next)
-           {
-               fprintf(stdout, "%d", idp->val.status.num);
-               if (idp->next)
-                   fputs(" ", stdout);
-           }
-           fputs("',\n", stdout);
+           fprintf(stdout, "%d", idp->val.status.num);
+           if (idp->next)
+               fputs(" ", stdout);
        }
+       fputs("',\n", stdout);
        listdump("mailboxes", ctl->mailboxes);
 
        indent('}');

-- 
                <a href="http://www.tuxedo.org/~esr/";>Eric S. Raymond</a>

<Prev in Thread] Current Thread [Next in Thread>