Solved

Sendmail queue

Posted on 1998-12-07
5
474 Views
Last Modified: 2010-04-21
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.
0
Comment
Question by:ianfoster
5 Comments
 
LVL 1

Expert Comment

by:arthurd
ID: 2008221
Start sendmail with the -d option.  This will queue all messages without doing any name lookups.
0
 
LVL 2

Expert Comment

by:blowfish
ID: 2008222
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

0
 

Author Comment

by:ianfoster
ID: 2008223
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?
0
 

Author Comment

by:ianfoster
ID: 2008224
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.
0
 

Accepted Solution

by:
MindPower earned 50 total points
ID: 2008225
Edit your /etc/sendmail.cf file and change the option:

O DeliveryMode=background

to

O DeliveryMode=defer

This will tell sendmail to accept any messages and put them into the queue without doing any DNS lookups. The messages will only be delivered every time the queue is run.


0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question