Skip Menu |
 

This queue is for tickets about the Mail-SPF CPAN distribution.

Report information
The Basics
Id: 70469
Status: stalled
Priority: 0/
Queue: Mail-SPF

People
Owner: Nobody in particular
Requestors: d.stussy [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



From d.stussy [...] yahoo.com Wed Aug 24 18: 33:11 2011
MIME-Version: 1.0
X-Ymail-Osg: wOUnRKQVM1kpU.FxshK3_IBlzfQPCeozOKt.cATWdyWVIx2 EgZB.gSDeSLEm.DPBBLGrziw3gPeG3yl4zV.wE5YTSjbaVl7ZWsjcwy81Wqs fHIeABRvu_lEkgZJLqlEBDmoddLlrmUTdoVJx0m.8NvhtDQUywo8RaoTjOVd mrxm.z8ioR1z1KoHTE916VlmLRBSIPk57.O_wMX3eR22QqZmIr74qWQcG2u0 k.A_i9jDtXvhDqh_2FS4i7OyeLuc2zh2WJwJ.7ODnl.bk.9axNt8gA2aeteZ uWsojWGvOnQEH2_9M8.H7xyE68.j8B8YYr7i3fLIzWbXXTRlqVavihxVppfA zsjasPzJLTcMEVVqvpZJyp26bEawQPJ4YyelTHXhjQ6LpMg.RFK_bS0QGZP6 aAsCfXDO9pg1IH_JPIRCTsCkjeLps0dTiZJeDDKrQahc2lpOUe9lFfpKYhlg Xy1Gv.3mclrstrwZaFFYyXIa0303R3KT4ZuDleUeCaJ9BCJita6ISoBYngMs 7cOTJyHoNWnTKzMKF986DmgOoTL0RinA-
X-Spam-Status: No, score=-8.794 tagged_above=-99.9 required=10 tests=[AWL=-1.805, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_HI=-5, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham
X-Mailer: YahooMailClassic/14.0.4 YahooMailWebService/0.8.113.313619
X-Yahoo-Newman-ID: 307126.467.bm [...] omp1006.access.mail.mud.yahoo.com
X-Spam-Flag: NO
content-type: text/plain; charset="utf-8"
Message-ID: <1314225181.56234.YahooMailClassic [...] web84511.mail.ne1.yahoo.com>
X-Yahoo-Newman-Property: ymail-3
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -8.794
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id B5DB02400B3 for <cpan-bug+mail-spf [...] hipster.bestpractical.com>; Wed, 24 Aug 2011 18:33:11 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jteR1VL2R90c for <cpan-bug+mail-spf [...] hipster.bestpractical.com>; Wed, 24 Aug 2011 18:33:10 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id E9D07240078 for <bug-mail-spf [...] rt.cpan.org>; Wed, 24 Aug 2011 18:33:09 -0400 (EDT)
Received: (qmail 25089 invoked by uid 103); 24 Aug 2011 22:33:09 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 24 Aug 2011 22:33:09 -0000
Received: from nm7.access.bullet.mail.mud.yahoo.com (HELO nm7.access.bullet.mail.mud.yahoo.com) (66.94.237.208) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with SMTP; Wed, 24 Aug 2011 15:33:06 -0700
Received: from [66.94.237.197] by nm7.access.bullet.mail.mud.yahoo.com with NNFMP; 24 Aug 2011 22:33:02 -0000
Received: from [66.94.237.101] by tm8.access.bullet.mail.mud.yahoo.com with NNFMP; 24 Aug 2011 22:33:02 -0000
Received: from [127.0.0.1] by omp1006.access.mail.mud.yahoo.com with NNFMP; 24 Aug 2011 22:33:02 -0000
Received: (qmail 59581 invoked by uid 60001); 24 Aug 2011 22:33:02 -0000
Received: from [71.106.211.51] by web84511.mail.ne1.yahoo.com via HTTP; Wed, 24 Aug 2011 15:33:01 PDT
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] yahoo.com
Authentication-Results: hipster.bestpractical.com (amavisd-new); domainkeys=pass header.from=d.stussy [...] yahoo.com
Delivered-To: cpan-bug+mail-spf [...] hipster.bestpractical.com
Subject: Issue - Mail::SPF - Parentheses in comments/text et. al.
Domainkey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Subject:To:MIME-Version:Content-Type; b=E5pbuA3LxeQbhDogARh8iHlYHuTypfPSAxxdPs9yKs8SV/wVENvwS05HMwXzVAqrutC3VcUqDOXRjiiz7WhSMgjtabwym8/TA14N9YUjLuEkYJyGDQ6NawaBwYKi6VkBf1u5TO7dUjaPdm9fHVPGkIihKacLs7XOtzyIBZvEljU=;
Return-Path: <d.stussy [...] yahoo.com>
X-RT-Mail-Extension: mail-spf
X-Original-To: cpan-bug+mail-spf [...] hipster.bestpractical.com
X-Spam-Check-BY: 16.mx.develooper.com
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1314225181; bh=kYmM5e4IuZGhC1bfF/g51h+gqpFDyk0KaGLphIwpWxI=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Subject:To:MIME-Version:Content-Type; b=R5SgITXet2SlWFNzzS+8pNqELt1fMvzrrD1wSOUBflI9lxh5ztnd4lUIAVmTaBFZLS9kCkxWUjypgC6DCCdv5wOI8wAisUfKgMq0/9KBx+UrJRGdvahaQaJV7HJdnK6Nj58OwP540G+eJnxN8EsIS6MMWmQsauNpNGALUqch1KM=
Date: Wed, 24 Aug 2011 15:33:01 -0700 (PDT)
X-Spam-Level:
To: bug-Mail-SPF [...] rt.cpan.org
From: d.stussy [...] yahoo.com
X-RT-Original-Encoding: us-ascii
Content-Length: 1831
Download (untitled) / with headers
text/plain 1.7k
Typical usage (example - Sendmail virtual hosting and MimeDefang): my $spfserver = Mail::SPF::Server->new(max_void_dns_lookups => undef, hostname => $SendmailMacros{'if_name'} ); my $spfrequest = Mail::SPF::Request->new(versions=>[1], scope=>'mfrom', identity => $id, ip_address => $ip, helo_identity => $helo); my $r = $spfserver->process($spfrequest); my $result = $r->code; my $local = $r->local_explanation; my $label = ($sender eq "<>") ? 'helo' : 'mailfrom'; ... action_insert_header('Authentication-Results',$SendmailMacros{'if_name'}. "; SPF=$result smtp.$label=$1 ($local)", 1) if ...; Result inserted into message (RFC 5451 format): Authentication-Results: example.com; SPF=pass smtp.mailfrom=example.net (example.net: 2001:db8::dead:beef:cafe is authorized to use 'sysop@example.net' in 'mfrom' identity (mechanism 'mx' matched)) $r->local_explanation returns a text string that is meant to be used as a comment for the result. However, SMTP messages (STD 10: RFC 5321 and 5322) do not allow nested comments. Parentheses may not appear in comments. The problem is that "local_explanation" returns parentheses in its string, so when the string is turned into a comment, it causes nested comments in violation of Internet mail standards. Please, would "local_explanation" be rewritten so that no result returned contains parentheses? It would also be cleaner not to have the domain queried about repeated in the explanation at the beginning of the string, as it is redundant when quoting the mailbox tested. Since I'm using the RFC 5451 format for reporting the results, not RFC 4408's original format of "Received-SPF:" headers, the returned variable received_spf_header has not been checked for similar problems. I leave that to the author/maintainer to determine.
MIME-Version: 1.0
In-Reply-To: <1314225181.56234.YahooMailClassic [...] web84511.mail.ne1.yahoo.com>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <1314225181.56234.YahooMailClassic [...] web84511.mail.ne1.yahoo.com>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-20565-1314230325-941.70469-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1051
On 2011-08-24 18:33:12, d.stussy@yahoo.com wrote: Show quoted text
> [...] > Result inserted into message (RFC 5451 format): > > Authentication-Results: example.com; SPF=pass > smtp.mailfrom=example.net (example.net: 2001:db8::dead:beef:cafe is > authorized to use 'sysop@example.net' in 'mfrom' identity > (mechanism 'mx' matched)) > > > $r->local_explanation returns a text string that is meant to be used > as a comment for the result. > > However, SMTP messages (STD 10: RFC 5321 and 5322) do not allow nested > comments. Parentheses may not appear in comments.
Not true. http://tools.ietf.org/html/rfc5322#section-3.2.2 : ctext = %d33-39 / ; Printable US-ASCII %d42-91 / ; characters not including %d93-126 / ; "(", ")", or "\" obs-ctext ccontent = ctext / quoted-pair / comment comment = "(" *([FWS] ccontent) [FWS] ")" <comment> may contain <ccontent>, which in turn may be a <comment>. Agreed?
From d.stussy [...] yahoo.com Wed Aug 24 20: 13:29 2011
X-Ymail-Osg: HeJpvoUVM1nE1g69t9WyhJ_twCWgVSctzwf5i5ciykFCCco fAkuTZPNJqEmzBMXJEVH67eh1.DFWbtm_Q.j2SKXdeRL6mNbo.9Gs38fw6bA crDjoXERlqvt6zzCWvQzEzbFC0utWUzPkFafOjVbdBBb9TaZuq0rqiCHvcsu DX9JitNJENGccQi6rDGpj.EF4Vmsd7VoTuYeMBs5uPYzBP1IED_5Q4zpBbyE 5xi8tsfcEPfFeS7_b.9fwsYXqkfh8apFV.wRKup0Rfz.MSfl_6HI3pmF4aql 9ADrSs_fCNIexif.SGkdiOMqAS5da5LQTzZNnpJyb.MxS3p1TIMhtwpa6Eho JM8Y02dv3..uPaEu6VSgyJm541x7KPqaUHc.JVjEdgryC9w2CaNXOw3nJ5BM j_xo1GK9qx4ZMnrc.OkkPP0P7ZHg.Gxe6nfGEwDS7gqBf5Og3ltr7uSrUBmb QA8Jkl168WiZW2aUmNP3bJ_VuX4.9DviCcdkYxS63uJeBYnqOLbstqvpsp5V Y2OFBp0rhgYJKLqZizkeoke5J_0S5E4sjza9D_TwWOClhVB4xFyK0qhVYaJt q01KlDMUg7jMVJ.RvUf.A3CfnmyEJMGquQFkD9jTKo1J6WK8G8MQ97JebVTd Z9qVY6MjP_wbXygTQXuY45GAirJiL2W.lX3t4ytP8Jw_iEA--
MIME-Version: 1.0
X-Spam-Status: No, score=-7.892 tagged_above=-99.9 required=10 tests=[AWL=-0.903, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_HI=-5, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-20565-1314230326-985.70469-6-0 [...] rt.cpan.org>
X-Mailer: YahooMailClassic/14.0.4 YahooMailWebService/0.8.113.313619
X-Spam-Flag: NO
X-Yahoo-Newman-ID: 363269.67342.bm [...] omp1021.access.mail.sp2.yahoo.com
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Yahoo-Newman-Property: ymail-3
Message-ID: <1314231194.82849.YahooMailClassic [...] web84518.mail.ne1.yahoo.com>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -7.892
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] yahoo.com
Authentication-Results: hipster.bestpractical.com (amavisd-new); domainkeys=pass header.from=d.stussy [...] yahoo.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 47C662400B8 for <cpan-bug+mail-spf [...] hipster.bestpractical.com>; Wed, 24 Aug 2011 20:13:29 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C-kpQgCEX3GJ for <cpan-bug+mail-spf [...] hipster.bestpractical.com>; Wed, 24 Aug 2011 20:13:23 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id B2A41240078 for <bug-mail-spf [...] rt.cpan.org>; Wed, 24 Aug 2011 20:13:22 -0400 (EDT)
Received: (qmail 31975 invoked by uid 103); 25 Aug 2011 00:13:22 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 25 Aug 2011 00:13:22 -0000
Received: from nm13.access.bullet.mail.sp2.yahoo.com (HELO nm13.access.bullet.mail.sp2.yahoo.com) (98.139.44.140) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with SMTP; Wed, 24 Aug 2011 17:13:18 -0700
Received: from [98.139.44.100] by nm13.access.bullet.mail.sp2.yahoo.com with NNFMP; 25 Aug 2011 00:13:15 -0000
Received: from [98.139.44.84] by tm5.access.bullet.mail.sp2.yahoo.com with NNFMP; 25 Aug 2011 00:13:15 -0000
Received: from [127.0.0.1] by omp1021.access.mail.sp2.yahoo.com with NNFMP; 25 Aug 2011 00:13:15 -0000
Received: (qmail 30524 invoked by uid 60001); 25 Aug 2011 00:13:14 -0000
Received: from [71.106.211.51] by web84518.mail.ne1.yahoo.com via HTTP; Wed, 24 Aug 2011 17:13:14 PDT
Delivered-To: cpan-bug+mail-spf [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #70469] Issue - Mail::SPF - Parentheses in comments/text et. al.
Return-Path: <d.stussy [...] yahoo.com>
Domainkey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=a0/kTFDLp9qcuf1VAAhGH9KrcPPGiNXBBkJBWJGx8G3r/eIDBmMWWJtFJkg69D6a6CQBEeCfqJvVbUJXD1cSLymUCso5NTCS091CaAKwm/T7J7WNdOPAJdV10R822mVwzpWYttJ3obvOkZOpgJWsfpba6NZek2H/qpcwZqkeaEg=;
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1314231194; bh=3sAisGcW+KfX2CaPGMkomVBg1gcmDrpoNq+IYZ4wf3g=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=2JY7RrhTsbRE23eLTikiwq26qlslPyczG9Pts3JEpVrgU+kv1y4Rk06mIGLiIbbkbAg5PhyjP2bnP9mGQzMA0qrYxl8/4FNfNn/UkDXEhKK71PwnA8+ZfF5V6dv1tA1epWkVHf3SsH4yEBIM104CfSCAIvBra6xxp5DKFxVhFl4=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+mail-spf [...] hipster.bestpractical.com
X-RT-Mail-Extension: mail-spf
Date: Wed, 24 Aug 2011 17:13:14 -0700 (PDT)
X-Spam-Level:
To: bug-Mail-SPF [...] rt.cpan.org
Content-Transfer-Encoding: quoted-printable
From: d.stussy [...] yahoo.com
RT-Message-ID: <rt-3.8.HEAD-20562-1314231210-115.70469-0-0 [...] rt.cpan.org>
Content-Length: 1762
Download (untitled) / with headers
text/plain 1.7k
--- On Wed, 8/24/11, Julian Mehnle via RT <bug-Mail-SPF@rt.cpan.org> wrote: Show quoted text
> On 2011-08-24 18:33:12, d.stussy@yahoo.com wrote:
> > [...] > > Result inserted into message (RFC 5451 format): > > > > Authentication-Results:   example.com; SPF=pass > >    smtp.mailfrom=example.net (example.net: 2001:db8::dead:beef:cafe is > >    authorized to use 'sysop@example.net' in 'mfrom' identity > >    (mechanism 'mx' matched)) > > > > > > $r->local_explanation returns a text string that is meant to be used > >    as a comment for the result. > > > > However, SMTP messages (STD 10: RFC 5321 and 5322) do not allow nested > >    comments.  Parentheses may not appear in comments.
> > Not true. > > http://tools.ietf.org/html/rfc5322#section-3.2.2 : > >    ctext           =   %d33-39 /          ; Printable US-ASCII >                        %d42-91 /          ;  characters not including >                        %d93-126 /         ;  "(", ")", or "\" >                        obs-ctext > >    ccontent        =   ctext / quoted-pair / comment > >    comment         =   "(" *([FWS] ccontent) [FWS] ")" > > <comment> may contain <ccontent>, which in turn may be a <comment>. > Agreed?
I missed that. I was thinking of another situation when I wrote that. However, [some] nested comments are still confusing when read by humans. Instead of using parentheses, maybe a dash would be clearer? In plain language, people generally do not nest parentheses. Sample: (2001:db8::dead:beef:cafe is authorized to use 'sysop@example.net' in 'mfrom' identity - mechanism 'mx' matched) I still think that the domain name prefix of the string should be dropped.
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-20562-1314231210-115.70469-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-20565-1314230326-985.70469-6-0 [...] rt.cpan.org> <1314231194.82849.YahooMailClassic [...] web84518.mail.ne1.yahoo.com> <rt-3.8.HEAD-20562-1314231210-115.70469-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-20563-1314232682-882.70469-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1196
Download (untitled) / with headers
text/plain 1.1k
On 2011-08-24 20:13:30, d.stussy@yahoo.com wrote: Show quoted text
> I missed that. I was thinking of another situation when I wrote that. > However, [some] nested comments are still confusing when read by > humans. Instead of using parentheses, maybe a dash would be > clearer? In plain language, people generally do not nest > parentheses. > > Sample: > (2001:db8::dead:beef:cafe is authorized to use 'sysop@example.net' in > 'mfrom' identity - mechanism 'mx' matched) > > I still think that the domain name prefix of the string should be > dropped.
I don't think changing the format of the local_explanation string is a good solution because, whereas your points may have merit, they are somewhat arbitrary and a matter of taste. There would soon be someone else who would rather have double quotes instead of single quotes, etc. The proper solution is to build an explanation string of your own. If you can't get all the necessary details from the result object (other than by parsing/dissecting the explanation string, which would be a very bad idea), then I'd be happy to add methods to expose them. Please let me know what details you need to build your own explanation string.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.