Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.