On Sat, 12 Oct 2002 17:28:25 +0200
[EMAIL PROTECTED] (R�mi Letot) wrote:

> Beno�t Barbier <[EMAIL PROTECTED]> writes:
> 
> > On Fri, 11 Oct 2002 22:23:44 +0200
> > [EMAIL PROTECTED] (R�mi Letot) wrote:
> >
> >> Beno�t Barbier <[EMAIL PROTECTED]> writes:
> >> 
> >> > Justement c'est ca qui me tracasse, il n'�cris plus dans le fichier que je lui 
>ai indiqu� dans :
> >> > /etc/fetchmailrc :
> >> > set logfile "/var/log/fetchmail/fetchmail.log"
> >> 
> >> Alors il �crit dans syslog. Cherche la chaine fetchmail dans les
> >> fichiers de /var/log, tu vas trouver.
> >> 
> >> cd /var/log
> >> grep -r fetchmail *
> >
> >
> > Oct 12 12:02:15 venus fetchmail[307]: open /var/log/fetchmail/fetchmail.log 
>(Permission denied)
> > Bien vu.:-)
> > Ils �taient dans /var/log/mail*
> >
> > Mais les droits ne sont pas plus restrictifs! C'est quoi cette histoire?
> >
> > -rw-r--r--    1 root     root        16160 oct 12 12:02 mail.err
> > -rw-r--r--    1 root     root      9974687 oct 12 13:09 mail.info
> > -rw-r--r--    1 root     root      9974687 oct 12 13:09 mail.log
> > -rw-r--r--    1 root     root        16160 oct 12 12:02 mail.warn
> > -------------------------
> > -rw-rw-r--    1 root     root            1 oct 11 15:20 fetchmail.log
> 
> Quels sont les droits sur le *r�pertoire* /var/log/fetchmail ?

drwxrwxr-x    2 fetchmai root         4096 oct 12 18:21 fetchmail


> 
> >
> >
> > Donc voici le compte rendu :
> >
> > J'ai donn� les droits 666 � fetchmail.log, depuis je n'ai plus (Permission denied) 
>mais il n'y �crit toujours pas.
> >
> > Les log ne disent rien d'int�ressant :
> >
> > oct 12 13:37:04 venus fetchmail[1139]: d�marrage de fetchmail 5.9.11 en t�che de 
>fond  
> > oct 12 13:37:08 venus fetchmail[1139]: 1 message pour benoit dans 
>pop.monmaileur.net (669 octets). 
> > oct 12 13:37:08 venus fetchmail[1139]: reading message [EMAIL PROTECTED]:1 
>of 1 (669 octets) 
> > oct 12 13:37:09 venus fetchmail[1139]:  non �limin� 
> > oct 12 13:43:16 venus fetchmail[1139]: 1 message (1 vu) pour benoit dans 
>pop.monmaileur.net (669 octets). 
> > oct 12 13:43:16 venus fetchmail[1139]: skipping message 
>[EMAIL PROTECTED]:1 (669 octets) non �limin� 
> >
> >
> > �a a l'aire tout � fait normale non?
> > mail.err reste muet depuis que j'ai donn� tout les droits � fetchmail.log
> >
> > De toute fa�on il ne fait pas ce que je lui demande dans "/etc/fetchmailrc"
> >
> >
> > \ps aux | grep fetchmail
> > fetchma   1139  0.0  0.4  2416 1224 ?        SN   13:37   0:00 /usr/bin/fetchmail 
>--daemon 360 --syslog -f /etc/fetchmailrc -i /var/mail/.fetchmail-UIDL-cache
> >
> > Dans "/etc/fetchmailrc" je lui indique : "set daemon 60" et pas 360
> >
> > "fetchmail-UIDL-cache" n'existe pas donc il aurais bien difficile de diff�rencier 
>les mails d�j� charg� et les autres.
> >
> > ls -a /var/mail/
> > .  ..  benoit
> >
> > Si je cr�e "/var/mail/.fetchmail-UIDL-cache" fetchmail ne d�marre plus.
> >
> > D�sol� pour la longueur de ce message, mais encore une fois, je suis largu�.
> 
> Effectivement, il semble ne pas tenir compte de ce que tu notes dans
> /etc/fetchmailrc. Tu n'as pas un /etc/defaults/fetchmail qui pourrait
> interf�rer ? Si c'est une debian, tu en as un, et il prend pr�c�dence
> sur /etc/fetchmailrc (c'est not� dans la doc et lors de l'installation
> du package je crois).
> 
> Corrige �ventuellement les permissions sur /var/log/fetchmail, et vois
> le /etc/defaults/fetchmail, ensuite ajoute uidl dans /etc/fetchmailrc,
> et vois dans ton log pourquoi il ne red�marre pas.

Les seuls info contenues dans /etc/defaults/fetchmail (qui ne soient pas en 
commentaires sont :
SERVICE=true
CONFFILE=/etc/fetchmailrc
OPTIONS="--daemon 60 --syslog"
RUNASROOT=false

Quand je le fait tourner sous mon login habituel (benoit) tout vas nikel sans l'option 
uidl il �cris bien $HOME/.fetchids.

J'ai lanc� fetchmail sous le compte fetchamil :
su -c 'fetchmail -f /etc/fetchmailrc  -i /var/log/fetchmail/.UIDL_log_file' fetchmail

�a marche aussi il �crit bien ".UIDL_log_file".

Le seul fichier qui puisse encore interf�rer c'est /etc/init.d/fetchmail

�A Y EST J'AI TROUV�! En lisent ce fichier j'ai vu qu'il y a l'option :
/etc/init.d/fetchmail debug-run

Et zoup, j'ai modifi� comme ceci :

# Tries to find a better place for the UIDL 
# cache than root's homedir
[ -d /var/mail ] && UIDL=/var/mail/.fetchmail-UIDL-cache
[ "${UIDL}" != "" ] && OPTIONS="${OPTIONS} -i ${UIDL}"

Par:
# Tries to find a better place for the UIDL 
# cache than root's homedir
[ -d /var/run/fetchmail/ ] && UIDL=/var/run/fetchmail/.fetchids 
   #L� il a les permissions pour �crire 
[ "${UIDL}" != "" ] && OPTIONS="${OPTIONS} -i ${UIDL}"

Encore une question de permission, mais alors quand fetchmail �crit dans :
/var/mail/"utilisateur"
C'est pas avec les droit de fetchmail il ne peut pas.
Il prend la casquette mail ou root alors?

Enfin �a � l'air de marcher.

MERCI R�MI d'avoir guid� mes recherches.:-)

Avec gratitude,
Beno�t
_______________________________________________________
Linux Mailing List - http://www.unixtech.be
Subscribe/Unsubscribe: http://www.unixtech.be/mailman/listinfo/linux
Archives: http://www.mail-archive.com/[email protected]
IRC: efnet.skynet.be:6667 - #unixtech

Répondre à