[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: logs de fetchmail



El 23/02/2010 13:21, Camaleón escribió:

Hum... creo que he encontrado algo.

[fetchmail-users] Rotating Fetchmail log
https://lists.berlios.de/pipermail/fetchmail-users/2009-November/002142.html

Me parece que vas a tener que añadir un comando de reinicio del servicio
en el script del logrotate:

***
http://opensource.apple.com/source/fetchmail/fetchmail-30/fetchmail/contrib/fetchmail.logrotate?f=text

# This is an example logrotate configuration file, editing required
# before use. It is useful if you have fetchmail logging to a separate
# file, /var/log/fetchmail as shown below.
#
# This file has been written for Debian Linux systems.
#
# Other systems will probably require adjustments, such as: how
# often to rotate, how many files to retain, how to name them, if
# compression is desired, which user and group the file should be
# created with, and where the .pid file is. Check the logrotate
# documentation for details.
#                                        --Matthias Andree, 2007-01-14

/var/log/fetchmail {
     weekly
     rotate 5
     compress
     missingok
     notifempty
     create 640 fetchmail root
     sharedscripts
     postrotate
         if [ -f /var/run/fetchmail/fetchmail.pid ]; then \
             if [ -x /usr/sbin/invoke-rc.d ]; then \
                 invoke-rc.d fetchmail restart>  /dev/null; \
             else \
                 /etc/init.d/fetchmail restart>  /dev/null; \
             fi; \
         fi;
     endscript
}
***

Lo que te interesa aquí sería el bloque del "postrotate/endscript" que
es lo que entiendo que verifica si el proceso está en ejecución y en caso
afirmativo, lo reinicia.

Es decir, con esto se le dice al fetchmail que tras ejecutar el rotate,
que detenga y reinicie el servicio de nuevo. Se ve que lo necesita para
poder volver a generar el registro... qué raro ¿verdad? :-?

Podrían añadirlo de manera predeterminada al instalar Fetchmail.

Prueba y nos cuentas. Espero que funcione sin problemas.

Saludos,

saludos y buen día colegas!! ..... resulta que me he leído lo que me ha mandado Camleón y de hecho parece que eso es lo que tendré que hacer matar el proceso y levantarlo de nuevo junto con el reseteo de logs diarios .. pero me pasa algo ahora explico .. yo por mis endiabladas cosas como dice Camaleon :-P .. puse el fetchmailrc dentro de /etc/postfix/fetchmailrc .. entonces cuando le invoco .. /etc/init.d/fetchmail restart obvio me dice que el configfile no existe en /etc/ .. enseguida me fui hasta /etc/init.d/fetchmail y le he cambiado el parámetro donde se le informa al init.d donde va a estar la configfile de fetchmail, hasta ahí bien CONFFILE="/etc/postfix/fetchmailrc" esa es la línea que he cambiado para decirle donde esta el fetchmailrc .. anja .. entonces cuando ejecuto . /etc/init.d/fetchmail start me dice que no se puede poner como background el proceso algo así .. ya hice lo mismo poniendo el fetchmailrc dentro de /ect directamente y sale el mismo error .. alguna sugerencia!!! muchas gracias a todos ... hasta la próxima ..

--

Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas

Infomed: http://www.sld.cu/


Reply to: