Awuku,
I use a startup script in /etc/init.d as follows:
------------------
#!/bin/sh
#
# fetchmail Script to up/down mail retrieval daemon
#
# chkconfig: 345 82 30
# description: fetchmail is a mail retrieval and forwarding utility; it
\
# fetches mail from remote mailservers and forwards to your \
# local (client) machine's delivery system.
#
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration
. /etc/sysconfig/network
# Check that networking is up
[ ${NETWORKING} = "no" ] && exit 0
# See how we were called.
case "$1" in
start)
echo -n "Starting fetchmail: "
daemon /usr/bin/fetchmail --daemon 900 --syslog \
--fetchmailrc /etc/fetchmailrc
echo
;;
stop)
echo -n "Stopping fetchmail: "
killproc fetchmail
echo
;;
status)
status fetchmail
;;
restart|reload)
$0 stop
$0 start
;;
*)
echo "Usage: fetchmail.init {start|stop|status|restart|reload}"
exit 1
esac
-------------
and have the /etc/fetchmailrc similar to:
-------------
# Configuration created Fri Nov 1 09:22:48 2002 by fetchmailconf
set postmaster "root"
set syslog
set properties ""
poll <userA_mail_server> with proto POP3
user <userA> there with password <blah> is <user1> here options fetchall
poll <userB_mail_server> with proto IMAP
user <userB>' there with password <blah> is <user2> here options
fetchall
------------------
and this setup works well for me.
Regards, Mike Klinke
On Tuesday 11 February 2003 09:40, Awuku Danso wrote:
> Hi all
> I'm currently running fetchmail as a user with a .fetchmailrc from
> the user's home directory and it seems to work fine. What I really do
> want is to run it as a service or daemon at boot time without any
> user intervention i.e without logging in to the machine at all. In
> effect I want the fetchmailrc file to be system-wide.
>
> So I made a copy of the .fetchmailrc file and placed it in the /etc
> directory (/etc/fetchmailrc) and later run fetchmail with the -d
> option from /etc/rc.d/rc.local. But this hasn't worked even though in
> principle I think it should. It seems to me that I'm missing a few
> tricks and that I'm not too far away from getting it right. Does
> anyone know if this is possible and has anyone tried it? Any tricks
> or tips from anyone would be very much appreciated.
--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list