Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Sendmail queue

Posted on 1998-12-07
5
Medium Priority
?
482 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 100 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.
Suggested Courses

719 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