Didier NOACK wrote:

> Salut � tous,
> 
> Ce matin j'ai du rebooter ma machine.
> Apr�s cela, je me suis aper�u que mon daemon fetchmail ne se lancait
> pas tout seul.
> 
> J'ai mis cette ligne dans /etc/rc.d/rc.local
> /usr/bin/fetchmail --daemon 660
> 
> ca ne le lance pas et il m'affiche un message comme quoi il ne trouve
> pas de compte courrier!
> 
> Du coup, j'ai cr�� un script que j'ai plac� dans le r�pertoire
> autostart de mon user. Pas mieux.
> 
> Pourtant lorsque je le lance dans un terminal, sous mon user, il se
> lance sans probl�me.
> 
> Qu'est-ce que j'ai oubli� ?
> Il doit bien y avoir un moyen de le lancer au d�marrage, non ?
> C'est encore le genre de truc ou on a la r�ponse devant le nez et on
> ne la voit pas :))
> 
> Merci pour le coup de pouce,
> Cordialement
> 

Didier,

Je te joins mon fichier de d�marrage de fetchmail, sauvegarde le sous 
/etc/rc.d/init.d et pense � adapter le chemin du fichier de 
configuration (/etc/fetchmailrc)
Ensuite, cr�ent les liens de d�marrage/arret dans /etc/rc.d/rcX.d 
N'oublie pas cependant que fetchmail ne pourra pas d�marrer en daemon si 
ta connection internet est inactive...

Dans /etc/fetchmailrc tu d�finis toutes les bal � t�l�charger ainsi que 
les utilisateurs destinataires. Pour faciliter la tache, tu peux 
utiliser fetchmailconf qui te cr�era un fetchmailrc dans ta home qui te 
servira d'exemple.

Ensuite tes users vont chercher leur courrier sur localhost.

-- 
Jean
                                \\\!///
                                -(@ @)-
----------------------------oOO--(_)--OOo----------------------------
Jean Segers             Venez r�ver -----> http://www.Demoiselles.com
26, rue du Pin                                  http://www.Sadems.com
34190 Saint Bauzille de Putois          http://www.EuropeTourisme.com
France                                          http://www.deveze.com
Gsm 06 86 12 49 15                        http://www.infos-mairie.com
Tel&Fax 04 67 73 38 30                           http://www.aspara.fr


#!/bin/sh
#
# chkconfig: 345 91 35
# description:  Starts and stops the fetchmail daemon used to retrive mail \
#               via various protocols (such as POP3 and IMAP4).
#
# config:       /etc/fetchmailrc

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

# Check that fetchmailrc exists.
[ -s /etc/fetchmail ] || exit 0


RETVAL=0

# See how we were called.
case "$1" in
  start)
        if [ ! -f /var/lock/subsys/fetchmail ]; then
                echo -n "Starting Fetchmail services: "
                daemon fetchmail -d 180 -f /etc/fetchmail       
                RETVAL=$?
                echo
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/fetchmail
        else
                RETVAL=1
        fi
        ;;
  stop)
        if [ -f /var/lock/subsys/fetchmail ]; then
#               killproc fetchmail
                action "Shutting Fetchmail services: " /usr/bin/fetchmail --quit
                rm -f /var/lock/subsys/fetchmail >/dev/null 2>&1
                RETVAL=$?
        else
                RETVAL=1
        fi      
        ;;
  restart)
        $0 stop
        $0 start
        RETVAL=$?
        ;;
  reload)
        if [ -f /var/lock/subsys/fetchmail ]; then
        echo -n "Reloading fetchmailrc file: "
                killproc fetchmail -HUP
                RETVAL=$?
                echo
        else
                RETVAL=1
        fi
        ;;
  status)
        status fetchmail
        RETVAL=$?
        ;;
  *)
        echo "Usage: $0 {start|stop|restart|reload|status}"
        exit 1
esac

exit $RETVAL




Vous souhaitez acquerir votre Pack ou des Services MandrakeSoft?
Rendez-vous sur "http://www.mandrakestore.com";

Répondre à