fetchmail-friends
[Top] [All Lists]

Re: [fetchmail]A few questions.

2002-04-08 00:03:54
Quoting from Henri van Riel's mail on Sat, Apr 06, 2002 at 10:28:38PM +0200:
  Say I have 10 different (busy) pop3 boxes to check. Is there a way
  to check them simultaniously instead of one after the other?

You will have to create 10 different config files and start fetchmail
in a loop. If you name the files as .fetchmailrc.1 .fetchmailrc.2
.fetchmailrc.3, ..., you may start it as (with /bin/bash):

    i=0
    while let 'i=i+1' 'i<=10'
    do
        fetchmail -f .fetchmailrc.$i
        mv .fetchmail.pid .fetchmail.pid.$i
    done

Then, you can wake up all of them in a loop:

    i=0
    while let 'i=i+1' 'i<=10'
    do
        mv .fetchmail.pid.$i .fetchmail.pid
        fetchmail
        mv .fetchmail.pid .fetchmail.pid.$i
    done

Or, kill all of them:

    i=0
    while let 'i=i+1' 'i<=10'
    do
        mv .fetchmail.pid.$i .fetchmail.pid
        fetchmail -q
    done

You may write a shell script which merges all the loops above. You can
then add more checks: does the pid file exist? does the config file
exist?

  Is it possible to have fetchmail delete every succesfully retreived
  and forwarded email immediately? I believe it now only deletes all
  retreived mail after the last one was retrieved succesfully.

Try adding:

    fetchlimit 1

to your config file(s). However, there could be too many overheads
because of that. A fetchlimit value of around 10 to 20 may give better
performance.

Sunil Shetye.


<Prev in Thread] Current Thread [Next in Thread>