LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-10-2005, 03:19 AM   #1
jacquedp
LQ Newbie
 
Registered: Mar 2004
Posts: 24

Rep: Reputation: 15
How to put fetchmail in startup ??


Hi,

I can retrieve my mail from my ISP from a fetchmail command. This works fine untill I have a powerfailure or the box is rebooted. Then I need to reenter the command.

How can I get my fetchmail command to execute automatically whenever the box is started ?

Regards,
Jacque
 
Old 03-10-2005, 09:51 AM   #2
Technoslave
Member
 
Registered: Dec 2003
Location: Northern VA
Posts: 493

Rep: Reputation: 30
Since you don't specify what distro you're on, I'll give you a couple of things you can do.

Create a script and put it in /etc/init.d and then link it in to /etc/rc3.d and /etc/rc5.d, whichever init level the box works on.

If that doesn't work for you, you could create an easy shell script that when it runs it checks ps for fetchmail, if it's not running it executes the command, then you can stick that shell in cron and have it go off every 15 minutes or however you'd like.
 
Old 03-10-2005, 10:06 AM   #3
jib2
Member
 
Registered: Sep 2003
Location: Paris, France
Distribution: Arch x86_64
Posts: 221

Rep: Reputation: 30
I had these lines added to my ~/.bash_profile

Code:
# lancement fetchmail
FLOGFILE="/home/your_user_name/.fetchlog"
if [ -f $FLOGFILE ] ;
then
	rm -f $FLOGFILE
fi
touch $FLOGFILE
/usr/bin/fetchmail -v -L $FLOGFILE
 
Old 03-10-2005, 10:26 AM   #4
Technoslave
Member
 
Registered: Dec 2003
Location: Northern VA
Posts: 493

Rep: Reputation: 30
Yeah, that should work too.
 
Old 03-10-2005, 10:58 AM   #5
ravikumarG
Member
 
Registered: Feb 2005
Location: India
Distribution: Fedora -2 ,Rhel3.0,CentOs 4.0-rc2
Posts: 60

Rep: Reputation: 15
HI,

create .fetchmymail file in your home folder and chnage permission to 710

in .fetchmymail add like

poll youmaildomain.com
proto pop3
port 110
user "mailboxusername"
pass "mailboxpass"
is localusername@localdomainname
nokeep
fetchall

Put follwing command in your cron tab so it can execute every 30 or 1 hr
/usr/local/bin/fetchmail -v -f '/yourhomefolder/.fetchmymail'


Its for Fedora based distors

Last edited by ravikumarG; 03-10-2005 at 10:59 AM.
 
  


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
Where do I Put the Command Application Startup bpellet314 Linux - Newbie 6 07-07-2005 11:30 AM
where to put startup commands nickcol Linux - General 1 05-10-2005 06:00 AM
My Redhat Linux 9 machine won't startup but gives a startup error" njugs79 Linux - Newbie 2 03-23-2005 01:50 AM
why does eth01 fail on startup and delay startup? infantpenguin Linux - Newbie 3 01-28-2005 11:45 AM
How to put programs in startup emanners Linux - General 2 07-09-2001 03:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:01 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration