Re: duplicate messages
Jim Ford <jaford@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> > Lately I've been seeing alot of duplicate messages in my mailboxes.
>
> I had the same problem. It was caused by a combination of my slow machine I
> use for recovering mail and the overhead of SpamAssassin. I had fetchmail
> polling my server every 10 mins, but sometimes there was so much mail at the
> server that it wasn't all picked up within the 10 min slot - so _another_
> fetchmail process was started.
The original poster was using getmail; if the cause is otherwise similar, it
can be prevented by having cron run getmail with a setlock-type program:
/path/to/setlock -n /var/lock/getmail /path/to/getmail [opts]
setlock is part of djb's daemontools package, but I'm sure there are other
similar programs out there.
Another alternative is to simply skip cron and do something like this:
while /bin/true ; do sleep 600 ; getmail ; done
instead.
MFT set.
Charles
--
-----------------------------------------------------------------------
Charles Cazabon <mutt@xxxxxxxxxxxxxxxxxxxx>
GPL'ed software available at: http://www.qcc.ca/~charlesc/software/
-----------------------------------------------------------------------