MailScanner on Debian
Marko Malikovic
marko at HUMAN.PEFRI.HR
Sun Jan 20 17:24:44 GMT 2002
Hello everybody on list!
My name is Marko Malikovic, I'm new on the this list and I live in Croatia.
I have this kind of problem and maybe somebody of you have experience with
this:
My server is working under Debian 3.0 (I'm new in Debian - GNU/Linux
because before I had Solaris).
I tried to install "Solaris/Other Linux/other Unix version 3.02-1" on my
Debian but I have problem because in /etc/init.d/sendmail I have not a
line "sendmail -bd -q15m" and I can not to make a changes describen in
http://www.sng.ecs.soton.ac.uk/mailscanner/install/sendmail.shtml where you
can read:
You should change this to the following two lines:
sendmail -bd -ODeliveryMode=queueonly - OQueueDirectory=/var/spool/mqueue.in
sendmail -q15m
On my system, every changes I have to do in /etc/mail/sendmail.conf
Below you can read my /etc/init.d/sendmail and /etc/mail/sendmail.conf:
/etc/init.d/sendmail:
#!/bin/sh -e
#
# Sendmail rc script for Debian (/etc/init.d/sendmail)
#
# Copyright (c) 2001-2001, Richard Nelson <cowboy at debian.org>.
# Time-stamp: <2001/08/20 10:00:00 cowboy>
#
# Notes (to all):
# * This is no longer a conffile - don't edit this... instead
# edit /etc/mail/sendmail.conf
#
# Notes (to self):
# *
#
set -e;
PATH=/bin:/usr/bin:/sbin:/usr/sbin;
#---------------------------------------------------------------------------
---
# Autoconf variables - in a form suitable for sh, perl
# Generated automatically from autoconf.sh.in by configure.
#---------------------------------------------------------------------------
---
# Variables for, and by, Autoconf (Don't touch these! edit config step)
PACKAGE_NAME="Sendmail";
PACKAGE_VERSION="8.12.1";
prefix="/usr";
exec_prefix="/usr";
bindir="/usr/bin";
sbindir="/usr/sbin";
libexecdir="/usr/lib/sm.bin";
datadir="/usr/share";
sysconfdir="/etc";
sharedstatedir="/usr/com";
localstatedir="/var";
libdir="/usr/lib";
includedir="/usr/include";
infodir="/usr/share/info";
mandir="/usr/share/man";
docdir="/usr/share/doc";
srcdir="/local/home/src/sendmail/sendmail-8.12.1/..";
# All the real work is done by helper functions defined herein
if [ ! -x ${datadir}/sendmail/sm_helper.sh ]; then
exit 0;
fi;
. ${datadir}/sendmail/sm_helper.sh;
# Some requisite initialization
Get_Parameters;
# Ok, why are we here...
case "$1" in
#-------------------------------------------------------------------
----
# Debian required/optional targets:
#-------------------------------------------------------------------
----
start)
echo -n "Starting Mail Transport Agent: "
start_sendmail;
echo "$NAME."
;;
stop)
echo -n "Stopping Mail Transport Agent: "
stop_sendmail;
echo "$NAME."
;;
restart)
echo -n "Restarting Transport Agent...";
# reload is equivalent (but faster) than stop/start !
reload_sendmail;
echo "$NAME.";
;;
restart-if-running)
if ! is_running mta && ! is_running msp; then
echo "Mail Transport Agent: $NAME is not running";
else
$0 restart;
fi;
;;
reload|force-reload)
echo -n "Reloading Mail Transport Agent configuration...";
reload_sendmail;
echo "$NAME.";
;;
#-------------------------------------------------------------------
----
# Local targets (sendmail commands/aliases) for MSP/MTA split
support
# These targets will pass along any provided parameters
#-------------------------------------------------------------------
----
newaliases)
shift;
newaliases $*;
;;
hoststat)
shift;
hoststat $*;
;;
purgestat)
shift;
purgestat $*;
;;
mailstats)
shift;
mailstats $*;
;;
mailq)
shift;
mailq $*;
;;
runq)
shift;
runq $*;
;;
#-------------------------------------------------------------------
----
# Local targets for extended support/debugging
#-------------------------------------------------------------------
----
status)
shift;
status $*;
;;
debug)
#
# If not running, can't debug
if is_running msp; then
echo -n "Dumping MSP state...";
$SIGNAL_MSP_CMD --signal USR1;
echo "done.";
fi;
if is_running mta; then
echo -n "Dumping MTA state...";
$SIGNAL_MTA_CMD --signal USR1;
echo "done.";
fi;
;;
clean|clean_que*|clean-que*)
#
# If running, don't clean the queues...
if is_running mta; then
echo "MTA is running, queue cleaning ill
advised...";
else
echo -n "Cleaning up the queues...";
clean_queues;
echo "done.";
fi;
;;
#-------------------------------------------------------------------
----
# Local targets for cronjob support
#-------------------------------------------------------------------
----
cron-msp)
cron_msp;
;;
cron-mta)
cron_mta;
;;
#-------------------------------------------------------------------
----
# Default target - bitch and moan
#-------------------------------------------------------------------
----
*)
echo "Invalid command <$1>";
echo "Usage: $0 <command>";
echo " Where <command> is one of the following";
echo " start|stop|restart|restart-if-running";
echo " reload|force-reload";
echo "
newaliases|hoststat|purgestat|mailstats|mailq|runq";
echo " status|debug|clean";
exit 1;
;;
esac;
exit 0;
/etc/mail/sendmail.conf:
#---------------------------------------------------------------------------
---
#
# /etc/mail/sendmail.conf
#
# Copyright (c) 2001-2001 Richard Nelson. All Rights Reserved.
# Version: 1.1.3
# Time-stamp: <2001/08/15 12:00:00 cowboy>
#
# Parameter file for sendmail (sourced by /etc/init.d/sendmail)
# Make all changes herein, instead of altering /etc/init.d/sendmail.
#
# After making changes here, you'll need to run /usr/sbin/sendmailconfig
# or /usr/share/sendmail/update_conf to have the changes take effect -
# If you change DAEMON_MODE, QUEUE_MODE, or QUEUE_INTERVAL, you'll also
# need to run /etc/init.d/sendmail restart.
#
# Changes made herein will be kept across upgrades.
#
# Supported parameters (and defaults) are listed herein.
#
# Notes:
# * This setup allows sendmail to run in several modes:
# - listener and queue
runner..DAEMON_MODE="daemon".QUEUE_MODE="daemon"
# - listener
only..............DAEMON_MODE="daemon".QUEUE_MODE="none"
# - queue runner
only..........DAEMON_MODE="none"...QUEUE_MODE="daemon"
# -
*NOTHING* ?!?..............DAEMON_MODE="none"...QUEUE_MODE="none"
#
# * You can also run the listener from inetd:
# - listener and queue
runner..DAEMON_MODE="inetd"..QUEUE_MODE="daemon"
# - listener
only..............DAEMON_MODE="inetd"..QUEUE_MODE="none"
#
# * You can also run the queue runner from cron:
# - listener and queue
runner..DAEMON_MODE="....."..QUEUE_MODE="cron"
# - queue runner
only..........DAEMON_MODE="none"...QUEUE_MODE="cron"
#
# * _PARMS entries herein are shown in precedence order, any later
_PARMS
# field will, if applicable, override any previous _PARMS fields.
#
# * Values *MUST* be surrounded with double quotes ("), single quotes
# will *NOT* work !
#
#---------------------------------------------------------------------------
---
# SMTP Listener Configuration
#
# DAEMON_MODE="Daemon"; Keyword SMTP listener
# daemon: Run as standalone daemon
# inetd: Run from inet supervisor (forks for each mail)
# none: No listener (ie, nullclient/smarthost)
#
# NOTE: for the nonce, DAEMON_MODE="none" is *NOT* supported !!!
#
DAEMON_MODE="Daemon";
#
# DAEMON_PARMS=""; String Listener parms
# Any parameters here will be ignored when run from cron.
# Note that MISC_PARMS and CRON_PARMS, if applicable, will override
# anything declared herein.
#
DAEMON_PARMS="";
#
# DAEMON_HOSTSTATS="No"; Boolean Listener stats
# This parameter determines whether or not host stats are collected
# and available for the `hoststat` command to display. There will
# be a (minor) performance hit, as files will be created/updated for
each
# sendmail delivery attempt. The files are fixed in size, and
small,
# but there can be many of them.
#
DAEMON_HOSTSTATS="Yes";
#
# DAEMON_MAILSTATS="No"; Boolean Listener stats
# This parameter determines whether or not mailer stats are collected
# and available for the `mailstats` command to display. There will
# be a (minor) performance hit, as this file will be updated for each
# item coming into, or out of, sendmail. The file is fixed in size,
# and small, so there's no need to rotate it.
#
DAEMON_MAILSTATS="No";
#
#---------------------------------------------------------------------------
---
# SMTP MTA Queue Runner Configuration
#
# QUEUE_MODE="${DAEMON_MODE}"; Keyword SMTP queue runner
# daemon: Run as standalone daemon
# cron: Run from crontab
# none: No queue runner (ie, nullclient/smarthost)
#
# NOTE: for the nonce, QUEUE_MODE="none" is *NOT* supported !!!
#
QUEUE_MODE="${DAEMON_MODE}";
#
# QUEUE_INTERVAL="10"; Integer in minutes
# Interval at which to run the MTA queues. What interval should you
use?
# The amount of time that is acceptable before retrying delivery on
# mail that couldn't be delivered in one run, or how long an item can
# set in the queue before having the first delivery attempt done.
#
QUEUE_INTERVAL="10";
#
# QUEUE_PARMS=""; String queue parameters
# Any parameters here are also used when run from cron.
# Note that MISC_PARMS and CRON_PARMS, if applicable, will override
# anything declared herein.
#
QUEUE_PARMS="";
#
#---------------------------------------------------------------------------
---
# SMTP - MSP Queue Runner Configuration
#
# MSP_MODE="${QUEUE_MODE}"; Keyword MSP queue runner mode
# daemon: Run as standalone daemon
# cron: Run from crontab
# none: No queue runner (ie, nullclient/smarthost)
#
# NOTE: If QUEUE_MODE="cron" & MSP_MODE="none", the MSP queue will
# be run as part of the MTA queue running process.
#
MSP_MODE="${QUEUE_MODE}";
#
# MSP_INTERVAL="${QUEUE_INTERVAL}"; Integer in minutes
# Interval at which to run the MSP queues. What interval should you
use?
# The amount of time that is acceptable before retrying delivery on
# mail that couldn't be accepted by the MTA, and was therefore left
# in the message submission queue. Probably should be the same as the
# whats used in QUEUE_INTERVAL.
#
MSP_INTERVAL="${QUEUE_INTERVAL}";
#
# MSP_PARMS="${QUEUE_PARMS}"; String queue parameters
# Any parameters here are also used when run from cron.
# Note that MISC_PARMS and CRON_PARMS, if applicable, will override
# anything declared herein.
#
MSP_PARMS="${QUEUE_PARMS}";
#
# MSP_MAILSTATS="${DAEMON_MAILSTATS}"; Boolean Listener stats
# This parameter determines whether or not mailer stats are collected
# and available for the `mailstats` command to display. There will
# be a (minor) performance hit, as this file will be updated for each
# item coming into, or out of, sendmail. The file is fixed in size,
# and small, so there's no need to rotate it.
#
MSP_MAILSTATS="No";
#
#---------------------------------------------------------------------------
---
# Miscellaneous Confguration
#
# MISC_PARMS=""; String miscellaneous parameters
# Miscellaneous parameters - applied to any sendmail invocation.
# Any parameters here are also used when run from cron.
# Applied after {DAEMON,QUEUE}_PARMS, and can therefore override them
# if need be (in which case why did use them?)
# Note that CRON_PARMS, if applicable, will override anything
# declared herein.
#
# Here is where'd you setup and debugging or special parms that you
# want shared betwixt the possibly separate listener/queue-runner
# processes.
#
MISC_PARMS="";
#
#---------------------------------------------------------------------------
---
# Cron Job Configuration
#
# CRON_MAILTO="root"; String cronjob output
# Recipient of *rare* cronjob output. Some cronjobs will be running
# under user `mail`, so any problems encountered would probably be
missed
# so define a user who actually (hopefully) checks email now and
again.
#
CRON_MAILTO="root";
#
# CRON_PARMS=""; String cron specific parmeters
# Cron parameters - applied *only* when sendmail queue running is done
# via a cronjob. Applied after QUEUE_PARMS and MISC_PARMS, and can
# therefore override them if need be.
#
CRON_PARMS="";
#
#---------------------------------------------------------------------------
---
# Queue Aging Configuration
#
# Why would you want to age your queues? On every queue-run interval,
# sendmail will try *every* file in the queue... If a site is down
# for a while, considerable time can be wasted each interval in
retrying
# it. The scheme supported allows aging by time, and can move the
older
# files to another (less frequently run queue), thereby reducing
overal
# system impact - and providing better mail throughput.
#
# Note that this support is completely separate from QUEUE_MODE=cron,
# you can age queues even if you're running QUEUE_MODE=daemon.
#
# There are four parts to the queue aging support, and these parts
# may be repeated, to operate on multiple queues.
#
# 1. Interval at which to age the queues (in minutes).
# What interval should you use? Roughly twice the normal queue
# interval, so that messages are tried twice in each successively
# slower queue.
#
# 2. Criteria (optional and defaults to interval). This is the
# specification of which files to move. It defaults moving
# files whose age in the queues exceeds the interval.
# This field, if specified can be very complex - supporting
# aging by just about anything! see qtool(8) for details.
#
# 3. To queue. This is the queue to which files will be moved.
# It may be fully qualified, or relative to /var/spool/mqueue.
#
# 4. From queue. This is the queue from which files will be moved.
# It may be fully qualified, or relative to /var/spool/mqueue.
#
# Samples:
# AGE_DATA="[['25', '', 'hourly', 'main']]";
# Every 25 minutes, move any file older than 25 minutes from
# /var/spool/mqueue/main to /var/spool/mqueue/hourly
#
# AGE_DATA="[['25', '', 'hourly', 'main'],\
# ['125', '', 'daily', 'hourly']]";
# Same as the above, but also move files from the hourly queue
# to the daily queue after 125 minutes in the hourly queue.
#
# AGE_DATA="[['25',\
# '-e \'$msg->{message} = Deferred: 452 4.2.2 Over quota\'',\
# 'overquota', 'main']]";
# Every 25 minutes, move all files deferred because of quota
# violations from /var/spool/mqueue/main to
# /var/spool/mqueue/overquota where they can be processed on
# a different interval, or by some other means.
#
# If the above samples suggest Perl arrays, well, they are...
#
# AGE_DATA=""; Perl array Queue aging data
#
AGE_DATA="";
#
#---------------------------------------------------------------------------
---
# Hidden variables (the blood be upon your
hands)
#
#
#---------------------------------------------------------------------------
---
# Deprecated variables (kept for reference)
#
DAEMON_STATS="${DAEMON_MAILSTATS}";
MSP_STATS="${MSP_MAILSTATS}";
#
#---------------------------------------------------------------------------
---
# Unknown variables (kept for reference)
#
#---------------------------------------------------------------------------
---
#
If somebody have can help me, I will be very happy.
Thank you very much for help and greetings from (in this time also cold)
Croatia!!!
--
Marko Malikovic
Strucni suradnik za kompjuterske aplikacije na Odsjeku za psihologiju
CARNet sistem administrator
Filozofski fakultet u Rijeci
Trg Ivana Klobucarica 1
Tel: ++385/51/315-232, 315-233
More information about the MailScanner
mailing list