LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices

Reply
 
Search this Thread
Old 07-11-2009, 02:33 AM   #1
Kumud Kumar Singh
LQ Newbie
 
Registered: Jul 2009
Posts: 7

Rep: Reputation: 0
Multiple instances of Fetchmail on RHEL


Hi,
My fetchmail.rc file is configured to download mails for more than 100 users. my fetchmail runs at every 5 minutes and download the mails. Now the problem is it takes around 15 minutes to 20 minutes to complete the one cycle of fetchmail file for downloading all mails for every users.

My question is can i run multiple instances of fetchmail at a time, say 3 instances of fetchmail file containing 30 uses each in one file, so that it downloads mails for all users at a time.

Thanks
Kumud
 
Old 07-12-2009, 06:44 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,140
Blog Entries: 54

Rep: Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791
Quote:
Originally Posted by Kumud Kumar Singh View Post
can i run multiple instances of fetchmail at a time
Yes you can!
 
Old 07-13-2009, 12:26 AM   #3
Kumud Kumar Singh
LQ Newbie
 
Registered: Jul 2009
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks,

Can u pls guide me how to do that.
I am stuck pls. help me

kumud
 
Old 07-13-2009, 06:59 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,140
Blog Entries: 54

Rep: Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791
What have you tried? What point are you stuck at?
 
Old 07-13-2009, 12:10 PM   #5
Kumud Kumar Singh
LQ Newbie
 
Registered: Jul 2009
Posts: 7

Original Poster
Rep: Reputation: 0
i have around 112 users.
what i have done is, i have created 3 .fetchmailrc file named .fetchmailrc1, .fetchmairc2 and 3, distributing 35 users in each file.
now the problem is fetchmail program runs only .fetchmailrc file.
i have tried running fetchmail for remaining files, but it doesn't fetch mails for the users which are in files .fetchmailrc2 and 3.

Thanks

Last edited by Kumud Kumar Singh; 07-13-2009 at 12:11 PM.
 
Old 07-13-2009, 12:35 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,140
Blog Entries: 54

Rep: Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791
'man fetchmail', "Miscellaneous Options": "-f <pathname> | --fetchmailrc <pathname>: Specify a non-default name for the ~/.fetchmailrc run control file"?
 
Old 07-14-2009, 12:54 AM   #7
Kumud Kumar Singh
LQ Newbie
 
Registered: Jul 2009
Posts: 7

Original Poster
Rep: Reputation: 0
I didn't get You.
Can u be more specific ?

Kumud
 
Old 07-14-2009, 05:02 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,140
Blog Entries: 54

Rep: Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791
If you issue 'man fetchmail', then in that manual page go to the chapter "Miscellaneous Options". There you will find a switch called "--fetchmailrc". This switch allows you to specify another path/name instead of "~/.fetchmailrc".
 
Old 07-14-2009, 11:28 PM   #9
Kumud Kumar Singh
LQ Newbie
 
Registered: Jul 2009
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks
but it doesn't help

Last edited by Kumud Kumar Singh; 07-29-2009 at 12:44 PM.
 
Old 08-16-2013, 02:58 AM   #10
Winmax
LQ Newbie
 
Registered: Jun 2012
Posts: 3

Rep: Reputation: Disabled
even this is pretty old i will trow my solution in here becouse i dont think this is solved:

Code:
 cat /etc/init.d/_fetchmailStart
#!/bin/sh

d_start() {

        echo "start user1 hotmail - POP3"
        export FETCHMAILHOME=/home/user1/.fetchmail/Hotmail
        fetchmail -L /var/log/fetchmailUser1Hotmail.log -f ${FETCHMAILHOME}/fetchmailrc --pidfile ${FETCHMAILHOME}/fetchmail.pid -d 800

        echo "start user1 gmx - IMAP IDLE"
        export FETCHMAILHOME=/home/user1/.fetchmail/GMX
        fetchmail -L /var/log/fetchmailuser1Gmx.log -f ${FETCHMAILHOME}/fetchmailrc --pidfile ${FETCHMAILHOME}/fetchmail.pid -d 60

        echo "start user2 gmx - IMAP IDLE"
        export FETCHMAILHOME=/home/user2/.fetchmail/GMX
        fetchmail -L /var/log/fetchmailuser2Gmx.log -f ${FETCHMAILHOME}/fetchmailrc --pidfile ${FETCHMAILHOME}/fetchmail.pid -d 60

        echo  "started"

}

d_stop() {
        pkill -f "fetchmail.pid"
        echo "killed"
}

case "$1" in
'start')
        d_start
        ;;
'stop')
        d_stop
        ;;
'restart')
        d_stop
        sleep 5
        d_start
        ;;
*)
        echo "Usage: $0 { start | stop | restart}"
        ;;
esac
exit 0
and for GMX IMAP IDLE:

Code:
cat /home/user1/.fetchmail/GMX/fetchmailrc
set postmaster root
set bouncemail

poll imap.gmx.net protocol IMAP user "myUserName@gmx.de" there with password "myPassword" is user1 here keep ssl idle
and hotmail POP:

Code:
cat /home/user2/.fetchmail/Hotmail/fetchmailrc
set postmaster root
set bouncemail

poll pop3.live.com protocol POP3 user "myUserName@hotmail.de" there with pass "myPassword" is user1 here ssl
maybe someone will find this and be happy
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple instances of KMix replica9000 Linux - Software 2 02-18-2009 10:59 AM
How do I manage CPU affinity FBO multiple instances of an application in RHEL v5.x? Kevin McLeod Linux - Newbie 2 02-05-2009 05:40 PM
Multiple instances tekmann33 Linux - Newbie 1 01-28-2008 03:05 PM
kickstart; how-to info needed for multiple instances of RH OS's and multiple unique v Joe_Wulf Linux - Server 4 06-21-2007 11:18 PM
Multiple instances of same user justinv Linux - General 7 01-19-2003 04:05 PM


All times are GMT -5. The time now is 03:19 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration