Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 26771 invoked from network); 5 Jan 2006 20:19:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Jan 2006 20:19:06 -0000 Received: (qmail 23482 invoked by uid 500); 5 Jan 2006 20:19:02 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 23396 invoked by uid 500); 5 Jan 2006 20:19:00 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 23377 invoked by uid 99); 5 Jan 2006 20:19:00 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jan 2006 12:19:00 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of rian@mit.edu designates 18.7.7.80 as permitted sender) Received: from [18.7.7.80] (HELO biscayne-one-station.mit.edu) (18.7.7.80) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jan 2006 12:18:59 -0800 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by biscayne-one-station.mit.edu (8.12.4/8.9.2) with ESMTP id k05KIZws009777 for ; Thu, 5 Jan 2006 15:18:35 -0500 (EST) Received: from [10.0.1.150] (adsl-153-42-5.mia.bellsouth.net [72.153.42.5]) (authenticated bits=0) (User authenticated as rian@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.1/8.12.4) with ESMTP id k05KISL2011641 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 5 Jan 2006 15:18:33 -0500 (EST) Subject: Re: mod_smtpd changes From: Rian Hunter To: dev@httpd.apache.org In-Reply-To: <009441B9-43B1-4D04-AD8D-51463AA07786@firehawksystems.com> References: <1136053412.617.15.camel@www> <009441B9-43B1-4D04-AD8D-51463AA07786@firehawksystems.com> Content-Type: text/plain Message-Id: <1136492306.9526.20.camel@www> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Thu, 05 Jan 2006 15:18:27 -0500 Content-Transfer-Encoding: 7bit X-Spam-Score: 1.217 X-Spam-Level: * (1.217) X-Scanned-By: MIMEDefang 2.42 X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Flag: NO X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Sat, 2005-12-31 at 13:47, Brian J. France wrote: > On Dec 31, 2005, at 1:23 PM, Rian Hunter wrote: > > Any comments, ideas and criticisms are highly welcomed! Thanks! > > Any changes on how recipients and queue/deliver is handled? > > I started implementing my proposal from a while back and got stuck on > how to handle errors. If a transaction has multiple valid recipients > and each one is handle by different queue modules, but only one of > queue modules returned a failed, is the whole thing a failure or > should the other messages be delivered and what should be returned > for a status for the DATA command? > > I am thinking that if all recipients are valid and can be handle by a > queue module then DATA will always return OK/200 what ever success > is. If a queue module then finds an error happens while trying to > really deliver the message, a bounce need to be generated. This > means we should have a common way to generate a bounce message > instead of having every module come up with its own. I've been thinking about this a lot and what tradeoff's to make in regard to handling the envelope. I think the main envelope of mod_smtpd will only support one recipient (= each queue module will handle one recipient at a time). What I was thinking is to make smtpd_run_queue a RUN_FIRST hook, so it will stop whenever a module returns SMTPD_ACCEPT (more about this below). A default queue will be installed that is inserted absolutely last, where if it is called it will bounce the message (because all the rest SMTPD_DECLINED). But this doesn't work in a setting where one address can be handled by multiple modules, so instead smtpd_run_queue would be a RUN_ALL hook and modules will set a flag in the envelope structure if the message was delivered correctly, then mod_smtpd checks if it was or wasnt' then sends a bounce message for the addresses that weren't. How should a queue module know if it should a certain recipient address? There are two options: * Have each queue module maintain its own list or criteria for which it will queue a message. * Let mod_smtpd be notified what queue modules should handle which recipient addresses. Then it sets in each recipients envelope structure a user defined string for a "queue handler." Each queue module checks the queue handler string to see if it handles that envelope. This is not the best either because it only allows for one queuer per recipient. The first option follows the needs of mod_smtpd but at the same time I really like the idea of a standardized of way of specifying which modules get what addresses. This simplifies configuration, eliminates code bloat and uses less cpu cycles. I'm still thinking about the best way to implement something like that. Rian Hunter