Re: FM v6.4.20 - concatenated log lines

Matthias Andree <[email protected]>
Newsgroups gmane.mail.fetchmail.user
Message-ID <[email protected]>
Am 08.08.21 um 20:07 schrieb J.Edner:
> Hi,
> I've just compiled and installed Fetchmail 6.4.20 on my server and found
> out, that some log lines are missing a new-line at the end, so that they
> are concatenated as follows:
>
> fetchmail: 16 messages for XYZ at SERVERfetchmail: reading message
> XYZ@SERVER:1 of 16fetchmail: reading message XYZ@SERVER:2 of
> 16fetchmail: reading message XYZ@SERVER:3 of 16fetchmail: reading
> message ...
>
> I checked the source code and saw that a new-line seems to be missing.
> After I've applied this small patch all messages are correctly written
> to the log file again:
>
> ----------
> --- a/driver.c. 2021-08-08 17:06:53.756148421 +0200
> +++ b/driver.c  2021-08-08 17:09:20.231666827 +0200
> @@ -629,7 +629,7 @@ static int fetch_messages(int mailserver
>
>         if (outlevel > O_SILENT)
>         {
> -         report_build(stdout, GT_("reading message %s@%s:%d of %d"),
> +         report_build(stdout, GT_("reading message %s@%s:%d of %d\n"),
>                          ctl->remotename, ctl->server.truename,
>                          num, count);
> ----------
>
> The result looks as follows now again:
>
> fetchmail: 16 messages for XYZ at SERVER
> fetchmail: reading message XYZ@SERVER:1 of 16
> fetchmail: reading message XYZ@SERVER:2 of 16
> fetchmail: reading message XYZ@SERVER:3 of 16
> ...

Hello Jürgen,

Thanks for the report, but the problem seems to be elsewhere, so the fix
consequently does not fit. It may fix your particular configuration, but
break with other configurations or command-line options.

report_build() is meant to "collect" log fragments at first, without
printing them immediately, and then there might be some size ticker
printed as the message is downloaded and forwarded, and ultimately,
there should be some other message (logged/printed with
report_complete()) that completes the log line and causes it to be printed.

I'll have a look - can you get me your configuration without passwords?
And the command line, too? Feel free to also mask the user/server names
in that case, but be sure to let all information about the destination
(mta, SMTP, LMTP, ... whatever) intact except possibly a nondefault
server name.

Thanks again.

Regards,
Matthias




_______________________________________________
Fetchmail-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fetchmail-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.