Bug#318670: exim4 stops delivery after 10 messages from fetchmail

David Lawyer dave at lafn.org
Sat Jul 16 22:37:56 UTC 2005


Package: exim4-base
Version: 4.44-2_i386

I get my mail from my ISP via fetchmail when I dialup.  So today there
were 34 messages waiting, but unfortunately, most of them don't get
delivered to me until 30 minutes later when exim4 does its next queue run.

Here's from the syslog file<sect1>:
----------------------------------------------------------------------------
Jul 16 12:22:08 davespc fetchmail[1499]: 34 messages for dave at mail.lafn.org (130271 octets). 
Jul 16 12:22:09 davespc fetchmail[1499]: reading message dave at zoon.lafn.org:1 of 34 (2147 octets) 
.....
Jul 16 12:23:47 davespc fetchmail[1499]: reading message dave at zoon.lafn.org:34 of 34 (2278 octets) 
----------------------------------------------------------------------------
Then from the exim mainlog file I got 12 "Completed" like the
following.  2 were in the queue before fetchmail started.
----------------------------------------------------------------------------
2005-07-16 12:22:45 1DtsFH-0000ON-S5 Completed
----------------------------------------------------------------------------
Then got many more like the following: (24 such messages ?)
----------------------------------------------------------------------------
2005-07-16 12:22:46 1DtsFK-0000ON-SM <= sgvlug-bounces at sgvlug.net H=(localhost) [127.0.0.1] U=fetchmail P=esmtp S=3374 id=20050715171656.8328.qmail at web33512.mail.mud.yahoo.com
2005-07-16 12:22:46 1DtsFK-0000ON-SM no immediate delivery: more than 10 messages received in one connection
----------------------------------------------------------------------------
So it's behaving as if smpt_accept-max_per_connection was set to 10.
But it's not set to 10 since the command: exim4 -bP shows it set to the
default of 1000.  Others have reported this problem on the Internet
and one reported that adding smpt_accept-max_per_connection = 100 to
the config file didn't fix the problem.  So I didn't try it.  After
all, it's already supposed to be set to 1000.  The -bP option seems to
show what exim4 thinks after checking it's configuration files.

The other possibility for this error was that
smpt_accept-max_per_connection = 10 was somehow given as a command
line option from /etc/init.d/exim4.  Here is that file:
----------------------------------------------------------------------------
#! /bin/sh
# /etc/init.d/exim4
#
# Written by Miquel van Smoorenburg <miquels at drinkel.ow.org>.
# Modified for Debian GNU/Linux by Ian Murdock <imurdock at gnu.ai.mit.edu>.
# Modified for exim by Tim Cutts <timc at chiark.greenend.org.uk>
# Modified for exim4 by Andreas Metzler <ametzler at downhill.at.eu.org>

set -e

[ -n "$EX4DEBUG" ] && set -x

upex4conf() {
  UPEX4CONF="update-exim4.conf"
  OLDIFS="$IFS"
  IFS=:
  for p in $PATH; do
    if [ -x "$p/$UPEX4CONF" ]; then
      IFS="$OLDIFS"
      $p/$UPEX4CONF
      return 0
    fi
  done
  IFS="$OLDIFS"
}

# Exit if exim runs from /etc/inetd.conf
if [ -f /etc/inetd.conf ] && grep -E -q "^ *([0-9.]+:)?smtp" /etc/inetd.conf
then
  upex4conf
  exit 0
fi


DAEMON=/usr/sbin/exim4
NAME=exim4

##test -x $DAEMON || exit 0
test -x /usr/lib/exim4/exim4 || exit 0

#read default file
QUEUERUNNER='combined'
QUEUEINTERVAL='30m'
[ -f /etc/default/exim4 ] && . /etc/default/exim4

start_exim()
{
  case ${QUEUERUNNER} in
    combined)
      start-stop-daemon --start --pidfile /var/run/exim4/exim.pid \
        --exec $DAEMON -- -bd -q${QFLAGS}${QUEUEINTERVAL} \
        ${COMMONOPTIONS} ${QUEUERUNNEROPTIONS} ${SMTPLISTENEROPTIONS}
      ;;
    separate)
      start-stop-daemon --start --pidfile /var/run/exim4/exim.pid \
        --exec $DAEMON -- -bd ${SMTPLISTENEROPTIONS} ${COMMONOPTIONS}
      start-stop-daemon --start --pidfile /var/run/exim4/eximqr.pid \
        --exec $DAEMON -- -oP /var/run/exim4/eximqr.pid \
        -q${QFLAGS}${QUEUEINTERVAL} ${QUEUERUNNEROPTIONS} ${COMMONOPTIONS}
      ;;
    queueonly)
      start-stop-daemon --start --pidfile /var/run/exim4/eximqr.pid \
        --exec $DAEMON -- -oP /var/run/exim4/eximqr.pid \
        -q${QFLAGS}${QUEUEINTERVAL} ${QUEUERUNNEROPTIONS} ${COMMONOPTIONS}
      ;;
    no|ppp)
      start-stop-daemon --start --pidfile /var/run/exim4/exim.pid \
        --exec $DAEMON -- -bd ${SMTPLISTENEROPTIONS}
      ;;
    nodaemon)
      ;;    
  esac
}

stop_exim()
{
# we try to kill eximqr and exim SMTP listener, no matter what
# ${QUEUERUNNER} is set to, we could have switched since starting.
  [ -f /var/run/exim4/eximqr.pid ] && \
    start-stop-daemon --stop --pidfile /var/run/exim4/eximqr.pid \
      --oknodo --retry 30 --exec $DAEMON
  [ -f /var/run/exim4/exim.pid ] && \
    start-stop-daemon --stop --pidfile /var/run/exim4/exim.pid \
      --oknodo --retry 30 --exec $DAEMON
  rm -f /var/run/exim4/eximqr.pid /var/run/exim4/exim.pid 
}

reload_exim()
{
  case ${QUEUERUNNER} in
    combined|no|ppp)
      start-stop-daemon --stop --pidfile /var/run/exim4/exim.pid \
        --signal 1 --exec $DAEMON
      ;;
    separate)
      start-stop-daemon --stop --pidfile /var/run/exim4/exim.pid \
        --signal 1 --exec $DAEMON
      start-stop-daemon --stop --pidfile /var/run/exim4/eximqr.pid \
        --signal 1 --exec $DAEMON
      ;;
  esac  
}
 

# check for valid configuration file
isconfigvalid()
{
if ! $DAEMON -bV > /dev/null ; then
  echo
  echo "Warning! Invalid configuration file for $NAME. Exiting." 1>&2
  exit 1
fi
}

case "$1" in
  start)
    echo -n "Starting MTA: "
    # regenerate exim4.conf
    upex4conf
    isconfigvalid
    start_exim
    echo "$NAME."
    ;;
  stop)
    echo -n "Stopping MTA: "
    stop_exim
    echo "$NAME."
      ;;
  restart)
    echo -n "Restarting MTA: "
    # regenerate exim4.conf
    upex4conf
    isconfigvalid
    stop_exim
    sleep 2
    start_exim
    echo "$NAME."
    ;;
  reload|force-reload)
    echo "Reloading $NAME configuration files"
    # regenerate exim4.conf
    upex4conf
    isconfigvalid
    reload_exim
    ;;
  status)
    exiwhat
    ;;
  *)
    echo "Usage: $0 {start|stop|restart|reload|status}"
    exit 1
    ;;
esac

exit 0
# vim:tabstop=2:expandtab:shiftwidth=2
----------------------------------------------------------------------------
			David Lawyer




More information about the Pkg-exim4-maintainers mailing list