Re: how to log date/time in daemon mode?

Gene Heskett <[email protected]>
Newsgroups gmane.mail.fetchmail.user
Message-ID <[email protected]>
On Saturday 29 September 2018 13:10:49 Juergen Edner wrote:

> Hi Gene,
>
> > I was subjected to a phishing attack yesterday and again today, and
> > it would have been a lot easier to correlate the messages if
> > fetchmail was logging the time, preferably the date/time at the end
> > of fetching of fetching each mail. Something it is not now, and
> > never has done.  And I just reread the man pages without finding a
> > clue.
> >
> > How do I enable this so a date/time exists in the fetchmail.log?
>
> I'm using the following two commands to log the start and end of
> request cyle:
>
> preconnect  "echo 'fetchmail: awakened at '`date +'%a, %d %b %G
> %H:%M:%S (%Z)'`"
>
> postconnect "echo 'fetchmail: sleeping at '`date +'%a, %d %b %G
> %H:%M:%S (%Z)'` for xxx seconds
>
THis would triple the size of the log in terms of line count. What I 
would really like to do is convert the single log line:

fetchmail: reading message [email protected]@pop.shentel.net:1 of 1 
(8044 octets) flushed

to:

fetchmail: reading message [email protected]@pop.shentel.net:1 of 1 
(8044 octets) flushed 09/27/18 14;51.28

Against this server, flush doesn't work as its a dovecot intended as an 
imap server, but accessed by pop3, so the del command is ignored until I 
log in with firefox, then I can delete the contents, but fetchmail 
can't.

> Further details can be found here:
>
> http://www.fetchmail.info/fetchmail-man.html

containing virtually zero about action timestamps.

Perhaps this should be turned into a wishlist for the next release of 
fetchmail?

Procmail, which I use as the MTA/MDA does this nicely. And doing it in 
both, I can get a better idea of how much time it takes procmail to run 
everything thru all the filters.

Thanks.

> Regards
> Juergen



-- 
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
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.