Guy Middleton <[EMAIL PROTECTED]> writes:
> My ISP sets an X-Original-To header (they use Postfix) when they deliver mail,
> so I would use RECIPIENT_HEADER instead of environment variables for recipient
> and extension.
>
> However, once my local fetchmail gets through with it, the message has two of
> them:
>
>
> From [EMAIL PROTECTED] Sun Jun 15 23:54:34 2003
> Return-Path: <[EMAIL PROTECTED]>
> X-Original-To: [EMAIL PROTECTED]
> Delivered-To: [EMAIL PROTECTED]
> Received: from localhost (localhost [127.0.0.1])
> by chaos.obstruction.com (Postfix) with ESMTP id BBC6C5C55
> for <[EMAIL PROTECTED]>; Sun, 15 Jun 2003 23:54:34 -0400 (EDT)
> X-Original-To: [EMAIL PROTECTED]
> Delivered-To: [EMAIL PROTECTED]
This looks suspiciously like Postfix is adding the second
X-Original-To ([EMAIL PROTECTED]), perhaps because it appended
'.obstruction.com' to the address for delivery (noted in
Delivered-To).
>
> So, my question and possible suggestion: is there any reason not to use the
> last occurrence of the RECIPIENT_HEADER line, rather than the first? The
> change would be something like this:
>
>
> --- tmda-rfilter 2003/06/15 01:44:14 1.1
> +++ tmda-rfilter 2003/06/16 05:31:59
> @@ -177,7 +177,7 @@
> # Use Defaults.RECIPIENT_HEADER instead if set.
> recipient_header = None
> if Defaults.RECIPIENT_HEADER:
> - recipient_header = parseaddr(msgin.get(Defaults.RECIPIENT_HEADER))[1]
> + recipient_header = parseaddr(msgin.get_all(Defaults.RECIPIENT_HEADER)[-1])[1]
> envelope_recipient = (recipient_header or os.environ.get('RECIPIENT'))
> if envelope_recipient == None:
> raise Errors.MissingEnvironmentVariable('RECIPIENT')
>
>
> Is there anything that would break because of this change?
I don't think there's anything that will break on your end. As far as
other users go, who knows? I don't recall seeing list mail about this
issue before, so I suspect that using the first field works for those
using RECIPIENT_HEADER. Hopefully, in most cases, it's the only
field.
The only way I know to find out is to put it into CVS and see who
hollers. I'll let Jason make the call on that.
Tim
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users