Re: unusal fetchmail error
I get similar problems with fetchmail. It times out while waiting for a server response. Even if the timeout parameter is supplied it does the same. IIRC, this is listed on the bugs page for fetchmail.
I threw together a couple of scripts to fix the problem.
This goes in my /etc/cron.d directory:
# /etc/cron.d/fetchmail_check: crontab fragment to check for fetchmail timeout hang.
# Check if fetchmail is hanging - every 15 minutes
0,15,30,45 * * * * root if [ ! "`tail -1 /var/log/fetchmail | grep timeout`" = "" ]; then /etc/init.d/fetchmail restart; fi
This goes in my /etc/init.d directory and is linked using /usr/sbin/update-rc.d:
#!/bin/sh
#
# /etc/init.d/fetchmail: start and stop fetchmail bg process.
#
FETCHINTERVAL=180
FETCHPROG=/usr/bin/fetchmail
FETCHMAILRC=/etc/fetchmailrc
FETCHLOG=/var/log/fetchmail
test -x $FETCHPROG || exit 1
case $1 in
start)
echo -n "Starting fetchmail background process..."
$FETCHPROG -v -t 120 -d $FETCHINTERVAL -f $FETCHMAILRC -L $FETCHLOG
echo "done."
;;
stop)
echo -n "Stopping fetchmail background process..."
$FETCHPROG -q
;;
restart)
/etc/init.d/fetchmail stop
/etc/init.d/fetchmail start
;;
esac
I have also added the usual log rotation and cleanup stuff.
HTH,
Jason.
On Wednesday, January 24, 2001, at 01:04 PM, Kozman Balint wrote:
>
> Hi to everyone,
>
> I'm running a local mailserver behind a Sonic pro firewall. Outgoing
> messages are sent via exim to the smarthost outside with address revision.
> I use fetchmail to get messages from the mailserver outside via pop3.
> The problem is with fetchmail: sometimes when it gets defunct after
> downloading messages, it becomes a Zombie, and some minutes later when the
> new instance of fetchmail comes up, it stops working 'cos "another
> fetchmail is running in background" and this way users don't get their
> mails.
> Is this a kernel problem, or a bug of fetchmail, or what?
> (fetchmail gets started via cron)
>
> Thanks in advance, regards:
>
> Balint
>
>
> --
> To UNSUBSCRIBE, email to debian-isp-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>
>
>
Reply to: