Solved

Sendmail queue

Posted on 1998-12-07
5
475 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unix/bash: scripted arithmetic 13 101
Write an app 10 71
Field name with special character (Ñ) in Oracle 11 94
Solaris acount issues 44 29
Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

820 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