Package: ssmtp Version: 2.61-2 Severity: wishlist Tags: patch -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The included patch adds an extra boolean configuration item, RerouteAllLocal. When set to yes, this sends mail to all local users to the "root" address instead of just mail to users of UIDs < 1000. It only has this effect when the "root" option is set i.e. when mail to users < 1000 would get rerouted. The default value is no, which gives the same behaviour as before. Please note that my debian packaging knowledge could be written on a piece of fusewire, so this patch might not work for everyone. It works here. - -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.11 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages ssmtp depends on: ii debconf 1.4.48 Debian configuration management sy ii libc6 2.3.2.ds1-21 GNU C Library: Shared libraries an ii libssl0.9.7 0.9.7e-3 SSL shared libraries - -- debconf information excluded -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCd+c0goQ42ohbFw0RAuG1AJ9F1soe3zKs53r6ygD6syLiJUa0bgCfUd2W YCSA8ySZX9vXo95IKf1LTF0= =CJAA -----END PGP SIGNATURE-----
diff -ru ssmtp-2.61.orig/debian/config ssmtp-2.61/debian/config --- ssmtp-2.61.orig/debian/config 2005-05-03 14:07:45.000000000 +0100 +++ ssmtp-2.61/debian/config 2005-05-03 21:09:20.000000000 +0100 @@ -7,7 +7,7 @@ if [ -f /etc/ssmtp/ssmtp.conf ] then - for v in `grep -E "^(root|mailhub|rewriteDomain|hostname|FromLineOverride)=" /etc/ssmtp/ssmtp.conf` + for v in `grep -E "^(root|mailhub|rewriteDomain|hostname|FromLineOverride|RerouteAllLocal)=" /etc/ssmtp/ssmtp.conf` do export $v done @@ -41,6 +41,15 @@ db_set ssmtp/fromoverride false fi fi + if [ -n "$RerouteAllLocal" ] + then + if [ "$RerouteAllLocal" = "YES" ] + then + db_set ssmtp/reroutealllocal true + else + db_set ssmtp/reroutealllocal false + fi + fi fi db_input medium ssmtp/root || true @@ -61,5 +70,7 @@ db_input medium ssmtp/fromoverride || true db_go +db_input medium ssmtp/reroutealllocal || true +db_go # Program End exit 0 diff -ru ssmtp-2.61.orig/debian/postinst ssmtp-2.61/debian/postinst --- ssmtp-2.61.orig/debian/postinst 2005-05-03 14:07:45.000000000 +0100 +++ ssmtp-2.61/debian/postinst 2005-05-03 21:05:05.000000000 +0100 @@ -40,6 +40,9 @@ db_get ssmtp/fromoverride test "$RET" = "true" && FromOverride=YES +db_get ssmtp/reroutealllocal +test "$RET" = "true" && RerouteAllLocal=YES + test -d /etc/ssmtp || exit 1 if test -s /etc/ssmtp/ssmtp.conf @@ -53,7 +56,7 @@ test -z "$FromOverride" && FromOverride=NO touch /etc/ssmtp/ssmtp.conf.tmp chmod 644 /etc/ssmtp/ssmtp.conf.tmp - sed "s/^root=.*/root=$root/;s/^mailhub=.*/mailhub=$mailhub/;s/^rewriteDomain=.*/rewriteDomain=$rewritedomain/;s/^hostname=.*/hostname=$hostname/;s/^FromLineOverride=.*/FromLineOverride=$FromOverride/;s/^#FromLineOverride=.*/FromLineOverride=$FromOverride/" /etc/ssmtp/ssmtp.conf > /etc/ssmtp/ssmtp.conf.tmp + sed "s/^root=.*/root=$root/;s/^mailhub=.*/mailhub=$mailhub/;s/^rewriteDomain=.*/rewriteDomain=$rewritedomain/;s/^hostname=.*/hostname=$hostname/;s/^FromLineOverride=.*/FromLineOverride=$FromOverride/;s/^#FromLineOverride=.*/FromLineOverride=$FromOverride/;s/^RerouteAllLocal#.*/RerouteAllLocal=$RerouteAllLocal/;s/^#RerouteAllLocal=.*/RerouteAllLocal=$RerouteAllLocal/" /etc/ssmtp/ssmtp.conf > /etc/ssmtp/ssmtp.conf.tmp mv -f /etc/ssmtp/ssmtp.conf.tmp /etc/ssmtp/ssmtp.conf else touch /etc/ssmtp/ssmtp.conf diff -ru ssmtp-2.61.orig/debian/templates ssmtp-2.61/debian/templates --- ssmtp-2.61.orig/debian/templates 2005-05-03 14:07:45.000000000 +0100 +++ ssmtp-2.61/debian/templates 2005-05-03 21:13:14.000000000 +0100 @@ -59,3 +59,12 @@ the envelope header with that address. A "negative" response will disallow this, and use only the default address or addresses set in /etc/ssmtp/revaliases. + +Template: ssmtp/reroutealllocal +Type: boolean +Default: false +_Description: Send mail for all local users to root? + A "positive" response will reroute mail for all local users to the + same place as mail for root, if mail rewriting for root is enabled. A + "negative" response will only reroute mail for UIDs < 1000 as + specified above.