[fetchmail]Fetchmail + crontab trouble

Christoph Pilka c.pilka@provacanza.de
Mon, 15 Nov 2004 06:12:32 +0100


hi folks,

i=B4m running fetchmail 6.2.5 on a gentoo box, but cannot get it working us=
ing crontab. running fetchmail directely from shell works fine, but as i put

*/5 * * * *     ctp     fetchmail -f /home/ctp/.fetchmailrc

in my /etc/crontab i get mails for root telling me "fetchmail: lock creatio=
n failed"

So for logging fetchmail's activity i changed it to:
*/5 * * * *     ctp     strace fetchmail -f /home/ctp/.fetchmailrc

and get system mails for root, which include (these are the last lines of t=
he strace):

...
rt_sigaction(SIGPIPE, {0x8054e3b, [], SA_RESTART}, {SIG_DFL}, 8) =3D 0
rt_sigaction(SIGQUIT, {0x8054e3b, [], SA_RESTART}, {SIG_DFL}, 8) =3D 0
open("//.fetchmail.pid", O_WRONLY|O_CREAT|O_EXCL|O_SYNC, 0666) =3D -1 EACCE=
S (Permission denied)
write(2, "fetchmail: lock creation failed."..., 33fetchmail: lock creation =
failed.
) =3D 33
exit_group(8)                           =3D ?

so i=B4m confused about the line 'open("//.fetchmail.pid", O_WRONLY ...'. n=
ormally there should be a 'open("/home/ctp/.fetchmail.pid", O_WRONLY ...' a=
s i see stracing fetchmail running from a shell directely.
Anyone has an idea what=B4s going wrong? The permissions for /home/ctp are =
set correctely:
$ ls -lad /home/ctp
drwxr-xr-x  65 ctp users 4096 Nov 15 05:53 /home/ctp
and there is no a lockfile from a previous session (as i read it should be =
a problem for fetchmail if there one would exist)
i=B4m really confused with this behaviour of fetchmail and i hope not to be=
 alone with this trouble ;-)

chris