[Poquito largo] Problema con Fetchmail

raefcl raefcl en yahoo.es
Lun Ago 16 11:21:45 CLT 2004


Holas co-listeros,

Ante todo, les deseo una gran semana.

Mi problema es que fetchmail esta bloqueando (parece?) algunos emails 
que se reciben, dejandolos en estado 'message frozen'.

El problema es que no se como corregirlo, ni recuperar los mensajes. He 
revisado en /var/spool/exim/ pero solo encuentro cosas que no entiendo 
para nada.

Mi configuracion local es:

----------------------------- .fetchmailrc ----------------------------

# Configuration created Sun Aug 15 22:36:28 2004 by fetchmailconf
set postmaster "respinoza"
set properties ""
poll servidor.de.correos with proto POP3
        user 'milogin' there with password 'mipassword' is 'milogin' here

------------------------------------------------------------------------

Ademas aproveche de usar procmail:

------------------------------ .procmailrc -----------------------------

LOGFILE=/var/log/procmaillog
LOGABSTRACT=all
VERBOSE=on
#
:0                              # Lista UTFSM
* ^List-Id.*linux en listas.inf.utfsm.cl
Linux
#
# Pense que con este filtro quizas no
# tendria problemas con los 'message frozen'
#
:0
* ^From.*otra.cuenta en yahoo.es
Inbox
#
:0fw
| /usr/bin/spamassassin
#
:0:
* ^X-Spam-Status: Yes
Junk
#
:0:
* ^Subject: [SPAM]
Junk

  ------------------------------------------------------------

Ademas debo indicar que cuando instale exim 4 solo indique que seria 
smatrhost para distribucion de correo local (o algo asi era la segunda 
opcion).

En cuanto a fetchmail, lo he dejado activado como demonio y su 
configuracion en /etc/init.d/ es

------------------ fetchmail -----------------------------------

#!/bin/sh
#
set -e

# Defaults
DAEMON=/usr/bin/fetchmail
CONFFILE=/etc/fetchmailrc
OPTIONS="-f $CONFFILE"
PIDFILE=/var/run/fetchmail/.fetchmail.pid
UIDL=/var/mail/.fetchmail-UIDL-cache
USER=fetchmail
PATH=/sbin:/bin:/usr/sbin:/usr/bin

test -f $DAEMON || exit 0
test -r $CONFFILE || exit 0

# sanity checks (saves on MY sanity :-P )
if ! id $USER >/dev/null 2>&1; then
         echo "$0: $USER user does not exist!"
         exit 1
fi

# add daemon option if user hasn't already specified it
if ! grep -qs '^[[:space:]]*set[[:space:]]\+daemon[[:space:]]' 
"$CONFFILE"; then
         OPTIONS="$OPTIONS -d 300"
fi

# add syslog option if user hasn't already specified it
if ! grep -qs '^[[:space:]]*set[[:space:]]\+no[[:space:]]\+syslog' 
"$CONFFILE"; then
         OPTIONS="$OPTIONS --syslog"
fi

# support for ephemeral /var/run
if [ "${PIDFILE%/*}" = "/var/run/fetchmail" ] && [ ! -d ${PIDFILE%/*} ]; 
then
         mkdir /var/run/fetchmail
         chown -h $USER:nogroup /var/run/fetchmail
         chmod 700 /var/run/fetchmail
fi

# sanity check
if [ ! -d ${PIDFILE%/*} ]; then
         echo "$0: directory ${PIDFILE%/*} does not exist!"
         exit 1
fi

# If the user is going to use a UIDL cache, try to find a better place 
for the
# UIDL cache than root's homedir. Also create $UIDL if it doesn't exist,
# because the daemon won't have the permission.
if ! grep -qs idfile "$CONFFILE" && [ -d /var/mail ]; then
         OPTIONS="$OPTIONS -i $UIDL"
         touch $UIDL
         chown -h $USER $UIDL
         chmod 0600 $UIDL
fi

# Makes sure certain files/directories have the proper owner
if [ "`stat -c '%U %a' $CONFFILE 2>/dev/null`" != "$USER 600" ]; then
         chown -h $USER $CONFFILE
         chmod -f 0600 $CONFFILE
fi

case "$1" in
         start)
                 echo -n "Starting mail retrieval agent: fetchmail"
                 if start-stop-daemon -S -o -q -p $PIDFILE -x $DAEMON -u 
$USER -a 180 /bin/su -- -c "$DAEMON $OPTIONS" $USER; then
                         echo "."
                 else
                         echo " (failed)."
                         exit 1
                 fi
                 ;;
         stop)
                 echo -n "Stopping mail retrieval agent: fetchmail"
                 if start-stop-daemon -K -o -q -p $PIDFILE -x $DAEMON -u 
$USER; then
                         echo "."
                 else
                         echo " (failed)."
                         exit 1
                 fi
                 ;;
         force-reload|restart)
                 echo -n "Restarting mail retrieval agent: fetchmail"
                 if ! start-stop-daemon -K -o -q -p $PIDFILE -x $DAEMON 
-u $USER; then
                         echo " (failed on stop)."
                         exit 1
                 fi
                 sleep 1
                 if start-stop-daemon -S -q -p $PIDFILE -x $DAEMON -u 
$USER -a /bin/su
-- -c "$DAEMON $OPTIONS" $USER; then
                         echo "."
                 else
                         echo " (failed on start)."
                         exit 1
                 fi
                 ;;
         try-restart)
                 if start-stop-daemon -S -t -q -p $PIDFILE -x $DAEMON -u 
$USER >/dev/null; then
                         exit 0
                 fi
                 $0 restart
                 ;;
         awaken)
                 echo -n "Awakening mail retrieval agent: fetchmail"
                 if [ -r $PIDFILE ]; then
                         su -c $DAEMON $USER <&- >/dev/null 2>&1
                         echo "."
                         exit 0
                 else
                         echo " (not running)."
                         exit 1
                 fi
                 ;;
         debug-run)
                 echo "$0: Initiating debug run of system-wide fetchmail 
service..." 1>&2
                 echo "$0: script will be run in debug mode, all output 
to forced to" 1>&2
                 echo "$0: stdout. This is not enough to debug failures 
that only" 1>&2                echo "$0: happen in daemon mode." 1>&2
                 echo "$0: You might want to direct output to a file, 
and tail -f it."
1>&2
                 if [ "$2" = "strace" ]; then
                         echo "$0: (running debug mode under strace. See 
strace(1) for
options)" 1>&2
                         echo "$0: WARNING: strace output may contain 
security-sensitive info, such as" 1>&2
                         echo "$0: passwords; please clobber them before 
sending the strace file to a" 1>&2
                         echo "$0: public bug tracking system, such as 
Debian's." 1>&2
                 fi
                 echo "$0: Stopping the service..." 1>&2
                 "$0" stop
                 echo "$0: exit status of service stop was: $?"
                 echo "$0: RUNUSER is $USER"
                 echo "$0: OPTIONS would be $OPTIONS"
                 echo "$0: Starting service in nodetach mode, hit ^C 
(SIGINT/intr) to finish run..." 1>&2
                 if [ "$2" = "strace" ] ; then
                         shift
                         shift
                         [ $# -ne 0 ] && echo "$0: (strace options are: 
-tt $@)" 1>&2
                         su -c "/usr/bin/strace -tt $@ $DAEMON $OPTIONS 
--nosyslog --nodetach -v -v" $USER <&- 2>&1 && true
                 else
                         su -c "$DAEMON $OPTIONS --nosyslog --nodetach 
-v -v" $USER <&- 2>&1 && true
                 fi
                 echo "$0: End of service run. Exit status was: $?"
                 exit 0
                 ;;
         *)
                 echo "Usage: /etc/init.d/fetchmail 
{start|stop|restart|force-reload|awaken|debug-run}"
                 echo "  start - starts system-wide fetchmail service"
                 echo "  stop  - stops system-wide fetchmail service"
                 echo "  restart, force-reload - starts a new 
system-wide fetchmail service"
                 echo "  awaken - tell system-wide fetchmail to start a 
poll cycle immediately"
                 echo "  debug-run [strace [strace options...]] - start 
a debug run of
the"
                 echo "    system-wide fetchmail service, optionally 
running it under strace"
                 exit 1
                 ;;
esac

exit 0

# vim:ts=4:sw=4:

----------------------------------------------------------------------------


Espero no sea demasiado, de todas formas pido las disculpas 
correspondientes.

Saludos y gracias.
Richard


Más información sobre la lista de distribución Linux