[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch: single-recipient enforced for bounces
- To: qmail@xxxxxxxxxxxxx
- Subject: Patch: single-recipient enforced for bounces
- From: Charles Cazabon <qmail@xxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 07 Dec 2001 12:02:04 -0600
- Delivered-to: mailing list qmail@list.cr.yp.to
- Mail-followup-to: qmail@list.cr.yp.to
- Mailing-List: contact qmail-help@list.cr.yp.to; run by ezmlm
- User-Agent: Mutt/1.2i
Greetings,
After the recent discussion here (Russell et al) about how messages with
the null envelope sender should never have more than a single envelope
recipient, I decided to implement a patch to enforce this.
The patch can be found at:
http://www.qcc.sk.ca/~charlesc/software/misc/nullenvsender-recipcount.patch
It patches qmail-smtpd.c and qmail-showctl.c only, and touches those
files in what I hope is a reasonably clean way, so it should apply
easily even to a source tree containing other small patches.
To enforce single-recipient for messages with the null envelope sender,
put a positive integer (i.e. 1) on the first line of
control/nullenvrecipcount. A negative or zero value in this file, or
absent file, means default (i.e. unpatched) behaviour.
When enabled, senders will receive a 550 error ("sorry, bounce messages
should have a single envelope recipient (#5.7.1)") after issuing the
DATA command if the envelope sender was null and more than one envelope
recipient was specified. RFC2821 seems to state this is the most
appropriate error code (permanent, policy-based error) for this
situation.
I've done some basic testing with the patch, but it should not be
considered ready for deployment on a commercially important mail server
yet. I'd appreciate testing and feedback. In particular, I would like
to clean up the modification to qmail-showctl, but I couldn't find a
clean way of handling the absent control file with the functions
available.
Charles
--
-----------------------------------------------------------------------
Charles Cazabon <qmail@discworld.dyndns.org>
GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/
-----------------------------------------------------------------------