#85 fetchmail.pl logging

open
nobody
None
5
2013-01-23
2010-12-23
No

idea stolen ;-) from http://linux.manuelschwab.de/?p=152

fetchmail.pl doesn't write a logfile, but in some cases that would be useful.

Commands for

a) no logging = current script
$ret=`/usr/bin/fetchmail`;

b) normal logging
$ret=`/usr/bin/fetchmail -L /var/log/fetchmail`;

c) verbose logging
$ret=`/usr/bin/fetchmail -v >>/var/log/fetchmail`;

(Note: I just copied the commands from the page, needs to be checked)

The config options could be
- $logfile = "/var/log/fetchmail" # needs to be writeable for the user running the fetchmail cronjob!
- $loglevel = 0; # 0 = no logging, 1 = normal log, 2 = verbose log

(Using logger, log4perl or something like that would avoid the permission requirement on fetchmail.log, but probably means more work)

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks