[fetchmail]Multiple foreground Fetchmail sessions

Stuart J. Browne sjbrowne@bluebottle.com
Fri, 10 Feb 2006 12:10:49 +1100


----- Original Message ----- 
From: "Matthias Andree" <matthias.andree@gmx.de>
To: <fetchmail-friends@lists.ccil.org>
Sent: Thursday, February 09, 2006 7:35 PM
Subject: Re: [fetchmail]Multiple foreground Fetchmail sessions


> "Stuart J. Browne" <sjbrowne@bluebottle.com> writes:
>
>> <SNIP>
>>
>> Anyway, even though I'm trying from a threaded framework, it sees it as
>> running multiple foreground sessions, and really doesn't want to let me
>> do it:
>>
>>    fetchmail: another foreground fetchmail is running at 32161.
>>
>> I was wondering if there was a nice way to supress this check to enable
>> me to run multiple at the same time (as there will never be any
>> backgrounded versions of this running).
>
> Not at this time, but there's a workaround - not exactly what you're
> looking for, but the best option at this time. Quoting the new 6.3.2
> manpage (the 6.2.5 manual page is less verbose but should contain the
> same information -- I hope Fedora backported the relevant fixes for
> CVE-2005-2335, -3088 and -4348 to 6.2.5):

CAN-2005-2335 has been back-ported into it, but I can't see the other two in 
the change log, so I might need to get/compile a different version..

>       If the environment variable FETCHMAILHOME is set to a valid and 
> exist-
>       ing directory name,  fetchmail  will  read 
> $FETCHMAILHOME/fetchmailrc
>       (the  dot  is  missing  in  this  case),  $FETCHMAILHOME/.fetchids 
> and
>       $FETCHMAILHOME/.fetchmail.pid rather than from the user's home 
> direc-
>       tory.  The .netrc file is always looked for in the the invoking 
> user's
>       home directory regardless of FETCHMAILHOME's setting.
>
> The directories for multiple concurrent processes must be separate, else
> you'll be seeing the same error again. So redirect the fetchmailrc to,
> say PREFIX/dynamic-fetchmail-NNN/fetchmailrc where NNN is a counter and
> then run "env FETCHMAILHOME=PREFIX/dynamic-fetchmail-NNN fetchmail" (of
> course replacing PREFIX and NNN everywhere).

Anyway, thanks for the idea.

On a side note, would being cheeky and symbolically linking /dev/null to 
fetchmail.pid get around it? :) (just thought of that this morning).

> You can remove the directory as fetchmail completes its job, unless you
> need the .fetchids for the next run (POP3 in UIDL mode needs it).

Does the '.fetchids' also get used for IMAP?

> Note this mailing list is going to shut down. Please subscribe to the
> fetchmail-users list at berlios.de, see the new home page at
> http://fetchmail.berlios.de/ for information.

Signed up for the other group.

It's odd.. The webpage listed in the 6.2.5 man pages 
(http://www.catb.org/~esr/fetchmail) mentions nothing about the new site or 
infact the 6.3.x release series.

Nice and confusing.. :)

Stuart