LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-31-2001, 06:47 PM   #1
iihay
Member
 
Registered: Jul 2001
Location: Morpeth UK
Distribution: Mandrake 10.0
Posts: 51

Rep: Reputation: 15
Running fetchmail daemon automatically


Hi,

I am trying to get fetchmail running as a daemon constantly. It will do so but I have to type fetchmail when I boot up to get it to start. I have been going round in circles on how to do this automatically.

Any pointers appreciated I know it has to be easy. I have tried putting it in .kdestart but with no joy.

Thanks

Iain
 
Old 09-02-2001, 06:18 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Find if youve got /etc/rc.d/rc.sysinit and /etc/rc.d/rc.local. Maybe the names or places are different on your system, but these files get run when booting. Just put the line in /etc/rc.d/rc.local to have it run on startup ("man fetchmail" for the correct switches to start it daemonized).

Now if you've got /etc/rc.d this means any daemon you would like to start at boot can be added. just look for the general layout in one of the files in /etc/rc.d/init.d, it should have these lines:

#!/bin/sh
case "$1" in
start)
daemon (name daemon) (options)
;;
kill)
killproc (name daemon) (options)
;;
esac

else put it in the systems crontab.


HTH somehow
 
Old 09-02-2001, 04:01 PM   #3
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
Cron would be a much cleaner way to run fetchmail every few minutes or so, if that is what you are after.
 
Old 09-02-2001, 05:16 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
oh, handy thing that took me ages to think of:

If you're not online when you boot up, fetchmail will fail. As it can't find the mail server. change the server name in it's .fetchmailrc to the servers IP address, OR add the server details to your /etc/resolv.conf.

I *think* that my fetchmail starts on boot, just by adding 'fetchmail' to rc.local, not totally sure it does.... think so tho

Oh, you do nkow that fetchmail has a daemon mode.. so you don't need to use cron or other scrupting tools!

Not really worth starting a new thread for.. but i was wondering if there was anythign available which can broadcast on to a network when new mail is recieved on the server. i have fetchmail on the server running a daemon at 60seconds, and outlook then checking the imap server on that every 3 minutes.. can't the imap tell me when i have new mail on my network?
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Any way to startup daemon automatically? Niceman2005 Linux - Newbie 2 01-12-2005 09:27 PM
How to have 'at' daemon start automatically on boot TrulyTessa Linux - Newbie 4 12-13-2004 11:12 AM
fetchmail and pop3 daemon? scuffell Linux - Networking 1 08-29-2004 04:30 PM
Getting Fetchmail to poll multiple user accounts in daemon mode davidbalt Linux - Newbie 0 02-23-2004 05:21 PM
Fetchmail - daemon mode - manfrake 9.2 VincentB Linux - Newbie 1 02-11-2004 01:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:38 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
Open Source Consulting | Domain Registration