From: Peter Pentchev Date: Sat, 19 Dec 2009 12:29:04 +0000 (+0000) Subject: Always use the debconf value for the smarthost and the double-bounce program. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ae8d91d50b9986ac07c6107e617e430852e44379;p=people%2Fms%2Fdma.git Always use the debconf value for the smarthost and the double-bounce program. Add a note to dma.conf stating that debconf may override the user values. --- diff --git a/changelog b/changelog index 72c6fc8..4268e83 100644 --- a/changelog +++ b/changelog @@ -12,6 +12,11 @@ dma (0.0.2009.07.17-3) unstable; urgency=low - remove a double space and unfuzzy the translations. Closes: #552586 * Fix a crash when the SMTP server does not support STARTTLS. Closes: #547594 + * Always use the user-supplied value from the debconf query for + the smarthost and the double-bounce program. This may result in + debconf overriding a manually-edited config file, so add a note to + dma.conf stating that these values are handled via debconf. + Closes: #544663 -- Peter Pentchev Wed, 09 Dec 2009 21:08:19 +0200 diff --git a/config b/config index dea8989..d85a797 100755 --- a/config +++ b/config @@ -15,20 +15,13 @@ else fi fi -if [ -f /etc/dma/dma.conf ]; then - rval=`awk '$1 == "SMARTHOST" {print $2}' /etc/dma/dma.conf` || true - db_set dma/relayhost "$rval" || true - rval=`awk '$1 == "DBOUNCEPROG" {print $2}' /etc/dma/dma.conf` || true - db_set dma/dbounceprog "$rval" || true -else - db_get dma/relayhost || true - if [ -z "$RET" ]; then - db_set dma/relayhost "mail.`hostname --domain`" || true - fi - db_get dma/defer || true - if [ -z "$RET" ]; then - db_set dma/defer 'dbounce-simple-safecat' || true - fi +db_get dma/relayhost || true +if [ -z "$RET" ]; then + db_set dma/relayhost "mail.`hostname --domain`" || true +fi +db_get dma/defer || true +if [ -z "$RET" ]; then + db_set dma/defer 'dbounce-simple-safecat' || true fi state=1 diff --git a/patches/03-debian-locations.patch b/patches/03-debian-locations.patch index 92d1be6..b555370 100644 --- a/patches/03-debian-locations.patch +++ b/patches/03-debian-locations.patch @@ -29,11 +29,13 @@ Last-Update: 2009-09-01 Just stick with the default. --- a/etc/dma.conf +++ b/etc/dma.conf -@@ -2,13 +2,13 @@ +@@ -2,13 +2,15 @@ # # Your smarthost (also called relayhost). Leave blank if you don't want # smarthost support. -#SMARTHOST ++# NOTE: on Debian systems this is handled via debconf! ++# Please use dpkg-reconfigure dma to change this value. +SMARTHOST mail.example.com # Use this SMTP port. Most users will be fine with the default (25) @@ -45,7 +47,7 @@ Last-Update: 2009-09-01 # Path to your spooldir. Just stay with the default. SPOOLDIR /var/spool/dma -@@ -39,7 +39,7 @@ +@@ -39,7 +41,7 @@ # Uncomment if you want to defer your mails. This is useful if you are # behind a dialup line. You have to submit your mails manually with dma -q diff --git a/patches/11-double-bounce.patch b/patches/11-double-bounce.patch index 2e2266c..9a4bd8a 100644 --- a/patches/11-double-bounce.patch +++ b/patches/11-double-bounce.patch @@ -185,13 +185,14 @@ Last-Update: 2009-09-01 }; --- a/etc/dma.conf +++ b/etc/dma.conf -@@ -41,6 +41,11 @@ +@@ -43,6 +43,12 @@ # behind a dialup line. You have to submit your mails manually with dma -q DEFER +# The double-bounce handler program. Leave this blank if you like dma's +# default behavior of simply aborting the delivery, or specify the name or +# full path to a program that will process the double-bounce message. ++# NOTE: on Debian systems this is handled via debconf! +DBOUNCEPROG dbounce-simple-safecat + # Uncomment if you want the bounce message to include the complete original