Solved

Sendmail queue

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Help stop mail server from sending spam. 27 117
IBM flash storage 840 15 51
auto mounter on solaris 1 40
MarkLogic 1 51
When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
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…
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.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now