Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2806
  • Last Modified:

SendMail queue runner

Redhat 2.1 ES
sendmail 8.12
MailScanner/Spamassin

sendmail relays to exchange server.

My relay seems to be working. But there is a 5 min delay before it gets to the exchange server.

sendmail/mailscanner/spamassissin then sendmail holds it.

I suspect the queue runner. but i can't figure out how to change the interval without breaking something.

Any ideas?
I have googled to no end and I really just don't grasp the queue runner concept!!

/[root@mail bin]# ps -ef |grep sendmail
root     15166     1  0 10:31 ?        00:00:04 sendmail: accepting connections
smmsp    15167     1  0 10:31 ?        00:00:00 sendmail: Queue runner@01:00:00
root     15168     1  0 10:31 ?        00:00:00 sendmail: Queue runner@00:01:00
smmsp    15170     1  0 10:31 ?        00:00:00 sendmail: Queue runner@00:15:00
root     29375 15166  0 12:21 ?        00:00:00 sendmail: server j153-210.instan
root     30554 15166  0 12:31 ?        00:00:00 sendmail: k9VHV6ab030554 enewsle
root     30658 15166  0 12:32 ?        00:00:00 sendmail: server enewsletter13.r
root     30791 15166  0 12:33 ?        00:00:00 sendmail: server 107.166.219.87.
root     31013 15166  0 12:35 ?        00:00:00 sendmail: startup with [80.237.9
root     31076 15166  0 12:35 ?        00:00:00 sendmail: startup with 72.46.159
root     31117 15166  0 12:35 ?        00:00:00 sendmail: startup with 201781381
root     31119 15166  0 12:35 ?        00:00:00 sendmail: startup with 62-101-12
root     31120 15166  0 12:35 ?        00:00:00 sendmail: startup with [88.241.2
root     31121 15166  0 12:35 ?        00:00:00 sendmail: startup with [88.241.2
root     31125 15166  1 12:35 ?        00:00:00 sendmail: server 38.20.3.213.fix
root     31126 15166  0 12:35 ?        00:00:00 sendmail: startup with lva103.si
root     31128 15166  0 12:35 ?        00:00:00 sendmail: startup with mx2277.cu
root     31130 23722  0 12:35 pts/2    00:00:00 grep sendmail
[root@mail bin]#

Thanks

0
speedracer1263
Asked:
speedracer1263
  • 2
1 Solution
 
PsiCopCommented:
I happen to have a RHEL v2.1 system hanging around, and it doesn't look like the stock sendmail startup invokes a queue-runner instance. So I dunno if what I've found from the v3.0 system has any bearing.

The Queue interval is set, for the "server" instance, in /etc/sysconfig/sendmail. The control script (/etc/rc.d/init.d/sendmail) uses the QUEUE value for the sendmail server instance as the value for the queue-runner instance, or defaults to 1 hour if there is nothing specified.

Personally, I think that's a boneheaded way to do it, but then RedHat should be ashamed of their crappy sendmail setup anyway.
0
 
speedracer1263Author Commented:
Not sure how to edit.
I was running sendmail 8.9 just fine and upgraded to 8.12 . I just don't understand the sm-client queue runner thing. Or if that;s really the issue. Nothing is in the standard queue. It seems like everything sits in clientmqueue. I don't even understand how to force a flush of the clientmqueue.

Sendmail is accepting email and then hands it off to Mailscanner. MailScanner is done in a few seconds. Then hands it back to sendmail. Which as far as i can tell puts it in the clientmqueue waiting for the queuerunner to process the mail!???????
Thanks
Here is (/etc/rc.d/init.d/sendmail

#!/bin/bash
#
# sendmail      This shell script takes care of starting and stopping
#               sendmail.
#
# chkconfig: 2345 80 30
# description: Sendmail is a Mail Transport Agent, which is the program \
#              that moves mail from one machine to another.
# processname: sendmail
# config: /etc/mail/sendmail.cf
# pidfile: /var/run/sendmail.pid

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Source sendmail configureation.
if [ -f /etc/sysconfig/sendmail ] ; then
      . /etc/sysconfig/sendmail
else
      DAEMON=no
      QUEUE=1h
fi
[ -z "$SMQUEUE" ] && SMQUEUE="$QUEUE"
[ -z "$SMQUEUE" ] && SMQUEUE=1h

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

[ -f /usr/sbin/sendmail ] || exit 0

RETVAL=0
prog="sendmail"

start() {
      # Start daemons.

      echo -n $"Starting $prog: "
      /usr/bin/newaliases > /dev/null 2>&1
      if test -x /usr/bin/make -a -f /etc/mail/Makefile ; then
        make all -C /etc/mail -s
      else
        for i in virtusertable access domaintable mailertable ; do
          if [ -f /etc/mail/$i ] ; then
            makemap hash /etc/mail/$i < /etc/mail/$i
          fi
        done
      fi
      daemon /usr/sbin/sendmail $([ "x$DAEMON" = xyes ] && echo -bd) \
                        $([ -n "$QUEUE" ] && echo -q$QUEUE)
      RETVAL=$?
      echo
      [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sendmail

      if ! test -f /var/run/sm-client.pid ; then
      echo -n $"Starting sm-client: "
      touch /var/run/sm-client.pid
      chown smmsp:smmsp /var/run/sm-client.pid
      daemon --check sm-client /usr/sbin/sendmail -L sm-msp-queue -Ac \
                        -q$SMQUEUE
      RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sm-client
        fi

      return $RETVAL
}

stop() {
      # Stop daemons.
      echo -n $"Shutting down $prog: "
      killproc sendmail
      RETVAL=$?
      echo
      [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sendmail
      if test -f /var/run/sm-client.pid ; then
            echo -n $"Shutting down sm-client: "
            killproc sm-client
            RETVAL=$?
            echo
            [ $RETVAL -eq 0 ] && rm -f /var/run/sm-client.pid
            [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sm-client
      fi
      return $RETVAL
}

# See how we were called.
case "$1" in
  start)
      start
      ;;
  stop)
      stop
      ;;
  restart|reload)
      stop
      start
      RETVAL=$?
      ;;
  condrestart)
      if [ -f /var/lock/subsys/sendmail ]; then
          stop
          start
          RETVAL=$?
      fi
      ;;
  status)
      status sendmail
      RETVAL=$?
      ;;
  *)
      echo $"Usage: $0 {start|stop|restart|condrestart|status}"
      exit 1
esac

exit $RETVAL
0
 
PsiCopCommented:
This line in the "start" portion of the script is what's starting the queue-runner instance:

     daemon --check sm-client /usr/sbin/sendmail -L sm-msp-queue -Ac \
                    -q$SMQUEUE

You could replace $SMQUEUE with your own value, for example "1m" for 1 minute, like so:

     daemon --check sm-client /usr/sbin/sendmail -L sm-msp-queue -Ac \
                    -q1m

The "-q" parameter is what sets the queue scanning interval.

The appearance of the queue-runner instance in sendmail v8.12 was to address security problems in earlier versions, including v8.9.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now