From: Matthias A. <mat...@gm...> - 2025-04-14 17:14:38
|
Am 14.04.25 um 10:36 schrieb Spencer Collyer: > Hi, > > After a recent update of my Arch Linux system my fetchmail is now at release 6.5.2+TLS+NLS. > > Since updating to this release, I'm seeing timestamps appearing in the fetchmail output, where they didn't appear before. > > For instance, sample output used to be: > > ----------------------------------------------- > 2 messages for spencercollyer at mail.plus.net (89359 octets). > reading message spe...@ma...:1 of 2 (47364 octets) flushed > reading message spe...@ma...:2 of 2 (41995 octets) flushed > ----------------------------------------------- > > But now I'm getting: > ----------------------------------------------- > Apr 04 09:00:00 fetchmail: 3 messages for spencercollyer at mail.plus.net (82284 octets). > Apr 04 09:00:00 fetchmail: reading message spe...@ma...:1 of 3Apr 04 09:00:00 fetchmail: (31026 octets) flushed > Apr 04 09:00:00 fetchmail: reading message spe...@ma...:2 of 3Apr 04 09:00:00 fetchmail: (31715 octets) flushed > Apr 04 09:00:01 fetchmail: reading message spe...@ma...:3 of 3Apr 04 09:00:01 fetchmail: (19543 octets) flushed > ----------------------------------------------- > > I'd like to go back to the old style format, as I don't really need the timestamp - I always call fetchmail in a cron job so don't need the timestamp as the mail from cron tells me when it iwas run. > > Failing that, is it possible to at least get rid of the second timestamp on each line? That is just noise which makes the message harder to read. > > I've looked over the help that's printed if you use `fetchmail -h` but don't see anything on there. > > Thanks, > > Spencer Hello Spencer, Thanks for the question and feedback. The log format is hardcoded, so you have not missed anything like a switch, there is none. I'll see if I can change something for 6.5.3 to fix the double timestamp though, <https://gitlab.com/fetchmail/fetchmail/-/issues/66>. In the interim, for cron, the first timestamp - can be stripped off by piping the output through sed, say, fetchmail --your-options-here 2>&1 | sed -Ee 's/^(Jan|Feb|Mar|Apr|May|Ju[nl]|Aug|Sep|Oct|Nov|Dev) [0-9]{1,2} [0-9]{1,2}:[0-9]{2}:[0-9]{2} //' HTH Matthias |