Le Mercredi 21 Ao�t 2002 14:37, vous avez �crit :
> Alain Codina a �crit:
> > Bonjour a toutes et tous
> > chaque membre de la famille, 4 pour le moment :-) a son compte
> > utilisateur sur un bon vieux IBM Aptiva 350 Mhz (j en vois qui
rient).
> > je voudrais recuperer les mails de nous 4 lors d une connexion
> > des utilisateurs "Maman" OU "Papa" et que chacun recupere ses
petits
> > en local .
> > J ai pense au couple fetchmail/procmail.
> > me trompe je ?
> > il y a mieux ?
> > ce n est pas assez clair ?
> >
>
> Pense � installer fetchmailconf qui est un frontend graphique pour
la
> configuration de fetchmail. Il va te cr�er dans ta home un fichier
> .fetchmailrc qui contiendra tous les param�tres n�cessaires � la
> r�cup�ration puis � la redistribution locale de tes courrier.
>
> Ensuite, copie ce fichier sous /etc/fetchmailrc, chown le root:root
et
> enfin chmod 600 afin de le laisser accessible au seul root.
>
> Voici un exemple de fichier qui scanne plusieurs bo�tes chez
plusieurs
> FAI. Il est suffisament parlant, adapte le � tes besoin.
>
> fetchmailrc:
> -------------------
>
> defaults
> poll www.mondelinux.org
> user jean with pass "jean_password" is jean here
> user nic with pass "nic_password is jean here
> user carine with pass "carine_pass" is puce here
> poll pop.laposte.net
> user jean.segers pass "jean_password" is jean
> user carine.glorieux pass "carine_pass" is puce
>
> --------------------
>
> Comme tu peux constater, la partie mondelinux.org est plus
"verbale" que
> la partie laposte.
>
> Ensuite, tu peux lancer fetchmail en daemon, automatiquement �
chaque
> d�marrage de la machine en cr�eant un script sauvegard� dans
> /etc/rc.d/init.d/fetchmail.
> Mais, pour que cela fonctionne, il faut que la connexion internet
soit
> �tablie *avant* le lancement du daemon...sinon, une solution
alternative
> est de mettre suid root sur /etc/rc.d/init.d/fetchmail ce qui
permettra
> � tout utilisateur de lancer le daemon apr�s que la connection
internet
> soit effective.
>
> Voici un exemple de /etc/rc.d/init.d/fetchmail qui va bien:
>
> --------------------
> #!/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/fetchmailrc ] || 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
>
> -------------------------------
>
>
> Adapte la ligne:
>
> daemon fetchmail -d 180 -f /etc/fetchmail
>
> en fonction de tes besoins. Ici, les bo�tes sont scann�es toutes
les 180
> secondes. Pour le d�marrage automatique au boot de la machine, il
suffit
> de cr�er les liens symboliques qui vont bien dans /etc/rc.d/rcX.d
>
> Cordialement,
>
> --
> 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://it.mondelinux.org
> France
http://www.deveze.com
> Gsm 06 86 12 49 15
http://www.cyberboutic.com
> Tel&Fax 04 67 73 38 30
http://www.mondelinux.org
Magnifique merci Jean !!
pour le script et tout le reste
Merci Christophe aussi.
--
a+
al@in
Vous souhaitez acquerir votre Pack ou des Services MandrakeSoft?
Rendez-vous sur "http://www.mandrakestore.com"