Hi, I've been taking a look at at RFC 1894 (http://www.ietf.org/rfc/rfc1894.txt) (see earlier discussion 'Catching a bounce' on server-user) to produce standard delivery status notifications. I don't think its very elegant to implement given the current delivery architecture, so my thoughts are as follows:
The RemoteDelivery mailet currently bounces any mail it can't deliver through a method bounce() in the MailetContext. The error message is generated inside RemoteDelivery, and the message seems to be fairly unstructured at this point. Most bounces are thrown as SendFailedExceptions. It may be possible to parse up the SendFailedException and extract the SMTP response code and error message, and set these as separate attributes in the Mail. RemoteDelivery could then be configured with another nested element in config.xml, say <bounceProcessor>remote-delivery-error</bounceProcessor>. On a bounce, the Mail could be forwarded to this processor. The remote-delivery-error processor would contain a mailet similar to the Bounce mailet already present to generate an RFC 1894 compliant bounce message based on the response code and message set previously in the Mail. This is similar to the method used in local-address-error with the Bounce mailet uncommented. The only obstacle I can't see through is the threading architecture of the spool/RemoteDelivery, which I haven't examined in detail. Any thoughts? Craig --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
