Double bounce message deletion HOWTO for sme server
Release supported: sme 5.x, 6.x
Author: Ray Mitchell - mitchellcpa_AT_yahoo.com.au
Updated: 27 May 2005
Problem:
Your sme server admin account receives messages with the words:
Hi. This is the qmail-send program at "xxxxxxx".
I tried to deliver a bounce message to this address, but the bounce bounced!
Solution:
By default double bounced messages are sent to postmaster (admin)
Two methods are outlined which will delete all those messages automatically.
The first method is only for v6.x sme server, whereas the second method is applicable to v5.x or v6.x sme server. A rpm is available to make implementation of the second method easier.
Information:
This how to is based on forum posts, thanks to the contributors, particularly Per Sørensen
and Rob Wellesley and Stephen noble for creating the rpm originally.
Instal Procedure Method A: (v6.x sme server only)
This method makes use of the fact that sme 6.0 has a devnull=alias entry in the accounts database, and a "pre-set" .qmail-devnull in /var/qmail/alias containing the # character
mkdir -p /etc/e-smith/templates-custom/var/qmail/control
echo devnull > /etc/e-smith/templates-custom/var/qmail/control/doublebounceto
/sbin/e-smith/signal-event email-update
/etc/init.d/qmail restart
Removal Procedure Method A:
rm /etc/e-smith/templates-custom/var/qmail/control/doublebounceto
/sbin/e-smith/signal-event email-update
/etc/init.d/qmail restart
You will now receive doublebounce messages in the admin account
Instal Procedure Method B:
Stephen Noble has created a rpm with the required fragments, just install that rpm to enable doublebounce deletion.
Download to an empty directory from
http://www.dungog.net/sme/files/dungog-deletedoublebounce-0.1-1.noarch.rpmcd to that directory and do rpm -Uvh *.rpm
Alternatively if you wish to configure your system manually, then do the following:
mkdir -p /etc/e-smith/templates-custom/var/qmail/alias/
touch /etc/e-smith/templates-custom/var/qmail/alias/.qmail-oblivion
/bin/echo "#" > /etc/e-smith/templates-custom/var/qmail/alias/.qmail-oblivion
mkdir -p /etc/e-smith/templates-custom/var/qmail/control/
touch /etc/e-smith/templates-custom/var/qmail/control/doublebounceto
/bin/echo "oblivion" > /etc/e-smith/templates-custom/var/qmail/control/doublebounceto
/sbin/e-smith/expand-template /var/qmail/alias/.qmail-oblivion
/sbin/e-smith/expand-template /var/qmail/control/doublebounceto
/etc/init.d/qmail restart
Removal Procedure Method B:
To uninstall the rpm do
rpm -e dungog-deletedoublebounce
If manually configured do the following:
rm /etc/e-smith/templates-custom/var/qmail/alias/.qmail-oblivion
rm /etc/e-smith/templates-custom/var/qmail/control/doublebounceto
/sbin/e-smith/signal-event email-update
/etc/init.d/qmail restart
You will now receive doublebounce messages in the admin account