Link to home
Start Free TrialLog in
Avatar of ianfoster
ianfoster

asked on

Sendmail queue

We are running 8.8.8

The Server is sitting behind a dial on demand isdn router, whenever the isdn router detects that a machine on the network requires access to the internet, it will dialup straight away.

How can I configure sendmail to queue up all mail and only try to send outgoing mail once every 30 mins for example? otherwise everytime someone tries to send an outgoing email, sendmail will try to deliver the mail straight away and the call charges will go through the roof.
Avatar of arthurd
arthurd

Start sendmail with the -d option.  This will queue all messages without doing any name lookups.
As arthurd says, start sendmail with the -d option, here's how to do that.  

Find your sendmail start-up script; on a Solaris system it will be /etc/init.d/sendmail.  Edit the file and find the line that starts sendmail, it should look something like this;

  /usr/lib/sendmail -bd -q30m

Change it to be this;

  /usr/lib/sendmail -bd -odq -q30m

The command line options are as follows; -bd tells sendmail to "become a daemon" and listen for incoming connections, -odq tells sendmail that delivery options is to queue all incoming mail, and -q30m tells sendmail to attempt to deliver all queued mail every 30 minutes.


--frankf

Avatar of ianfoster

ASKER

Ive tried that and im still having problems

Ive changed the startup script (its on linux btw) and this is what it now looks like....

#! /bin/sh
# Copyright (c) 1996 S.u.S.E. Gmbh Fuerth, Germany.  All rights reserved.
#
# Author: Florian La Roche <florian@suse.de>, 1996, 1997
#         Werner Fink <werner@suse.de>, 1996
#

 /etc/rc.config

test "$SMTP" = yes || exit 0

if test -z "$SENDMAIL_ARGS" ; then
        SENDMAIL_ARGS="-bd -odq -q30m"
fi

case "$1" in
    start)
        echo "Initializing SMTP port. (sendmail)"
        /usr/sbin/sendmail $SENDMAIL_ARGS &
        ;;
    stop)
        echo -n "Shutting down SMTP port:"
        killproc -TERM /usr/sbin/sendmail
        echo
        ;;
    reload)
        kill -1 `head -1 /var/run/sendmail.pid`
        ;;
    *)
        echo "Usage: $0 {start|stop}"
        exit 1
esac

exit 0

which looks fine to me, ive then stopped and started sendmail and then run pine to send an email to a non local user, the mail goes out straight away which isn't what i want to happen.

Have i missed anything?
I've figured it out, just flag the relevent mail delivery agents as being expensive and then tell sendmail to hold expensive mail until you tell it to process the queue.
ASKER CERTIFIED SOLUTION
Avatar of MindPower
MindPower

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial