dma for Debian
--------------
-1. Smarthost operation by default - needs to be configured!
+Smarthost operation by default - needs to be configured!
After first installing dma, you need to configure it for proper operation -
whether it should deliver all outgoing e-mail messages through a single
be configured through the debconf questions, but you may change the setting
using the SMARTHOST directive in the /etc/dma/dma.conf file.
-2. Deferred delivery possible via a cron job
-
-The dma mail transfer agent may operate in two modes - immediate and
-deferred. In both cases, a new dma process is spawned for the delivery
-of each outgoing message, and this process lives on until the message is
-either successfully delivered or it times out after five days.
-
-In immediate delivery mode, which is the default, the new dma process is
-spawned as soon as the message is submitted to the queue. In deferred mode,
-the message is left in the queue and will only be processed when dma is invoked
-separately with the "-q" command-line option. This used to be the preferred
-delivery mode for the Debian package - even though there may be slight delays,
-the queue must still be processed periodically anyway (if an immediate delivery
-is deferred, the message is still left on the queue), so there's no harm done
-in always doing it that way.
-
-Hence, the Debian package of dma installs a cron job that attempts to
-flush the queue every five minutes. Note that this does NOT mean that
-message delivery will be attempted every five minutes! Once the queue
-is flushed, a separate dma instance is spawned for each still-unhandled
-message, and it takes care of reasonable exponential back-off in case of
-delivery problems.
-
-This cron job has no ill effect if dma has been configured for immediate
-delivery - if a message is submitted, a dma process shall be spawned to handle
-its delivery at once, and the cron job will not spawn any additional processes
-or in any way interfere with the running ones. However, if the dma process
-that handles the delivery should die for some reason, or the system should be
-restarted, the cron job will ensure that a new delivery process is spawned in
-due time and the message is not just left in the queue.
-
- -- Peter Pentchev <roam@ringlet.net> Tue, 27 Jul 2010 13:26:48 +0300
+ -- Simon Schubert <2@0x2c.org> Fri, 29 Oct 2010 00:25:48 +0200
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-. /usr/share/debconf/confmodule
-db_version 2.0
-db_capb backup
-
-if [ -e /etc/mailname ]; then
- db_set dma/mailname "`cat /etc/mailname`" || true
-else
- db_get dma/mailname || true
- if [ -z "$RET" ]; then
- db_set dma/mailname "`hostname --fqdn`" || true
- fi
-fi
-
-state=1
-while [ "$state" -ge 1 -a "$state" -le 3 ]; do
- case "$state" in
- 1) db_input high dma/mailname || true
- ;;
- 2) db_input high dma/relayhost || true
- ;;
- esac
- if db_go; then
- state=$(($state + 1))
- else
- state=$(($state - 1))
- fi
-done
-
-db_stop || true
-exit 0
CPPFLAGS:= $(shell dpkg-buildflags --get CPPFLAGS)
LDFLAGS:= $(shell dpkg-buildflags --get LDFLAGS)
-CFLAGS+= -DNEED_GETPROGNAME -DNEED_REALLOCF -DNEED_STRLCPY
-
-CONFFILES= auth.conf dma.conf virtusertable
+CONFFILES= dma.conf auth.conf
ifneq (,$(filter werror,$(DEB_BUILD_OPTIONS)))
CFLAGS+= -Werror
export CFLAGS CPPFLAGS LDFLAGS
override_dh_auto_build:
- $(MAKE) -f Makefile.plain
+ $(MAKE) -f Makefile
$(MAKE) -C $(DDIR)/migrate
override_dh_auto_clean:
- $(MAKE) -f Makefile.plain clean
+ $(MAKE) -f Makefile clean
$(MAKE) -C $(DDIR)/migrate clean
override_dh_auto_install:
- $(MAKE) -f Makefile.plain DESTDIR=$D PREFIX=/usr CONFDIR=/etc install
- install -d -o root -g mail -m 770 $D/var/spool/dma
- install -o root -g mail -m 640 $(CONFFILES) $D/etc/dma
+ $(MAKE) -f Makefile DESTDIR=$D PREFIX=/usr CONFDIR=/etc install
+ install -o root -g mail -m 644 dma.conf $D/etc/dma
+ install -o root -g mail -m 640 auth.conf $D/etc/dma
override_dh_fixperms:
dh_fixperms -Xusr/sbin/dma -Xvar/spool/dma -Xetc/dma
-Template: dma/mailname
-Type: string
-_Description: System mail name:
- The 'mail name' is the domain name used to 'qualify' mail addresses
- without a domain name.
- .
- This name will also be used by other programs. It should be the
- single, fully qualified domain name (FQDN).
- .
- Thus, if a mail address on the local host is foo@example.org,
- the correct value for this option would be example.org.
-
Template: dma/relayhost
Type: string
_Description: Smarthost:
Please enter the IP address or the host name of a mail server that
this system should use as outgoing smarthost. If no smarthost is
- specified, dma will try to deliver all messages by itself.
+ specified, dma will try to deliver all messages directly.