[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Gateway Upgraded

Mikel Lindsaar

10/30/2007 12:56:00 AM

Hey James,

Have you got it on TMail now?

If so and you hit bugs wrt TMail let me know... we'll get them fixed asap.

Mikel

On 10/30/07, James Edward Gray II <james@grayproductions.net> wrote:
> We are now running on my new gateway code that will hopefully get
> even more messages across the Usenet divide.
>
> Please help me keep an eye on the gateway these next couple of days
> and verify that it's running as planned. You can email issues to me
> privately at this address.
>
> James Edward Gray II
>
>

7 Answers

James Gray

10/30/2007 3:02:00 AM

0

On Oct 29, 2007, at 7:55 PM, Mikel Lindsaar wrote:

> Have you got it on TMail now?

My new version uses TMail, yes.

> If so and you hit bugs wrt TMail let me know... we'll get them
> fixed asap.

I did have to revert because Usenet was rejecting my posts. It's how
TMail is doing the headers. For example, TMail constructed a header
like:

"X-Ruby-Talk:\r\n\t<11152772-
AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>\r\n"

My Usenet host rejected that header because it didn't have a space
after the colon.

I'm hesitant to call that a bug since I'm trying to use an email
library for Usenet posts. Does anyone know if this is a strict
requirement of Usenet posts and/or email?

James Edward Gray II

Mikel Lindsaar

10/30/2007 4:08:00 AM

0

James,

Unless anyone has anything to the contrary, per this RFC it looks like a bug.

I've quoted the RFC below.

James, could you give me a test case for it - or at least the email or
way you created the email and I'll get this nutted out.

Regards

Mikel

Quote from RFC 822:

August 13, 1982 - 4 - RFC #822

Standard for ARPA Internet Text Messages

3. LEXICAL ANALYSIS OF MESSAGES

3.1. GENERAL DESCRIPTION

A message consists of header fields and, optionally, a body.
The body is simply a sequence of lines containing ASCII charac-
ters. It is separated from the headers by a null line (i.e., a
line with nothing preceding the CRLF).

3.1.1. LONG HEADER FIELDS

Each header field can be viewed as a single, logical line of
ASCII characters, comprising a field-name and a field-body.
For convenience, the field-body portion of this conceptual
entity can be split into a multiple-line representation; this
is called "folding". The general rule is that wherever there
may be linear-white-space (NOT simply LWSP-chars), a CRLF
immediately followed by AT LEAST one LWSP-char may instead be
inserted. Thus, the single line

To: "Joe & J. Harvey" <ddd @Org>, JJV @ BBN

can be represented as:

To: "Joe & J. Harvey" <ddd @ Org>,
JJV@BBN

and

To: "Joe & J. Harvey"
<ddd@ Org>, JJV
@BBN

and

To: "Joe &
J. Harvey" <ddd @ Org>, JJV @ BBN

The process of moving from this folded multiple-line
representation of a header field to its single line represen-
tation is called "unfolding". Unfolding is accomplished by
regarding CRLF immediately followed by a LWSP-char as
equivalent to the LWSP-char.

Note: While the standard permits folding wherever linear-
white-space is permitted, it is recommended that struc-
tured fields, such as those containing addresses, limit
folding to higher-level syntactic breaks. For address
fields, it is recommended that such folding occur





On 10/30/07, James Edward Gray II <james@grayproductions.net> wrote:
> On Oct 29, 2007, at 7:55 PM, Mikel Lindsaar wrote:
>
> > Have you got it on TMail now?
>
> My new version uses TMail, yes.
>
> > If so and you hit bugs wrt TMail let me know... we'll get them
> > fixed asap.
>
> I did have to revert because Usenet was rejecting my posts. It's how
> TMail is doing the headers. For example, TMail constructed a header
> like:
>
> "X-Ruby-Talk:\r\n\t<11152772-
> AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>\r\n"
>
> My Usenet host rejected that header because it didn't have a space
> after the colon.
>
> I'm hesitant to call that a bug since I'm trying to use an email
> library for Usenet posts. Does anyone know if this is a strict
> requirement of Usenet posts and/or email?
>
> James Edward Gray II
>
>

Mikel Lindsaar

10/30/2007 5:39:00 AM

0

> I did have to revert because Usenet was rejecting my posts. It's how
> TMail is doing the headers. For example, TMail constructed a header
> like:
>
> "X-Ruby-Talk:\r\n\t<11152772-
> AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>\r\n"

James, I just tried this and get a different result:

irb(main):007:0> mail = TMail::Mail.new
=> #<TMail::Mail port=#<TMail::StringPort:id=0xa7fa80> bodyport=nil>
irb(main):008:0> mail['X-Ruby-Talk'] =
'<11152772-AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>'
=> "<11152772-AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>"
irb(main):009:0> mail.to_s
=> "X-Ruby-Talk: <11152772-AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>\n\n"

Leaves a space after the colon and doesn't introduce a line feed :/

Using TMail 1.1.0...

Mikel

F. Senault

10/30/2007 10:54:00 AM

0

Le 30 octobre 2007 à 04:01, James Edward Gray II a écrit :

> I did have to revert because Usenet was rejecting my posts. It's how
> TMail is doing the headers. For example, TMail constructed a header
> like:
>
> "X-Ruby-Talk:\r\n\t<11152772-
> AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>\r\n"

Double-plus-ungood. Strictly, it _may_ be an acceptable folded header,
but it's the first time I see that kind of syntax in the wild (with the
break directly after the colon).

> My Usenet host rejected that header because it didn't have a space
> after the colon.
>
> I'm hesitant to call that a bug since I'm trying to use an email
> library for Usenet posts. Does anyone know if this is a strict
> requirement of Usenet posts and/or email?

Yes, both. Usenet and mail use the same generic message format (RFC
2822 [1]). The headers used and the signification of those may be
slightly different, but the messages are to be structured the same way.

The real difference comes from the administrative standpoint, where
rules governing (the text part of) Usenet are much more restrictive
(since there are nothing like a binary email address versus a text only
email address).

Fred
[1] : ftp://ftp.rfc-editor.org/in-notes/r...
--
Face it: the people doing the hiring are morons. So are the venture
capitalists, for ever letting most of the dot-coms see any light other
than the BOFH lighting his flamethrower.
(Dan Holdsworth in the SDM)

James Gray

10/30/2007 1:02:00 PM

0

On Oct 30, 2007, at 12:39 AM, Mikel Lindsaar wrote:

>> I did have to revert because Usenet was rejecting my posts. It's how
>> TMail is doing the headers. For example, TMail constructed a header
>> like:
>>
>> "X-Ruby-Talk:\r\n\t<11152772-
>> AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>\r\n"
>
> James, I just tried this and get a different result:
>
> irb(main):007:0> mail = TMail::Mail.new
> => #<TMail::Mail port=#<TMail::StringPort:id=0xa7fa80> bodyport=nil>
> irb(main):008:0> mail['X-Ruby-Talk'] =
> '<11152772-AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>'
> => "<11152772-AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>"
> irb(main):009:0> mail.to_s
> => "X-Ruby-Talk: <11152772-
> AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>\n\n"
>
> Leaves a space after the colon and doesn't introduce a line feed :/

The gateway code was using the encoded() method:

>> require "tmail"
=> true
>> mail = TMail::Mail.new
=> #<TMail::Mail port=#<TMail::StringPort:id=0xa26cb4> bodyport=nil>
>> mail["X-Ruby-Talk"] = "<11152772-
AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>"
=> "<11152772-AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>"
>> mail.to_s
=> "X-Ruby-Talk: <11152772-
AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>\n\n"
>> mail.encoded
=> "X-Ruby-Talk:\r\n\t<11152772-
AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>\r\n\r\n"

Is that not what I should be doing?

James Edward Gray II

Mikel Lindsaar

10/30/2007 1:42:00 PM

0

No, you are doing it right. Looks like a bug. I'll get onto it.

Added a bug report
http://rubyforge.org/tracker/index.php?func=detail&aid=15194&group_id=4512&...

Regards

Mikel

On 10/31/07, James Edward Gray II <james@grayproductions.net> wrote:
> On Oct 30, 2007, at 12:39 AM, Mikel Lindsaar wrote:
>
> >> I did have to revert because Usenet was rejecting my posts. It's how
> >> TMail is doing the headers. For example, TMail constructed a header
> >> like:
> >>
> >> "X-Ruby-Talk:\r\n\t<11152772-
> >> AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>\r\n"
> >
> > James, I just tried this and get a different result:
> >
> > irb(main):007:0> mail = TMail::Mail.new
> > => #<TMail::Mail port=#<TMail::StringPort:id=0xa7fa80> bodyport=nil>
> > irb(main):008:0> mail['X-Ruby-Talk'] =
> > '<11152772-AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>'
> > => "<11152772-AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>"
> > irb(main):009:0> mail.to_s
> > => "X-Ruby-Talk: <11152772-
> > AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>\n\n"
> >
> > Leaves a space after the colon and doesn't introduce a line feed :/
>
> The gateway code was using the encoded() method:
>
> >> require "tmail"
> => true
> >> mail = TMail::Mail.new
> => #<TMail::Mail port=#<TMail::StringPort:id=0xa26cb4> bodyport=nil>
> >> mail["X-Ruby-Talk"] = "<11152772-
> AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>"
> => "<11152772-AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>"
> >> mail.to_s
> => "X-Ruby-Talk: <11152772-
> AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>\n\n"
> >> mail.encoded
> => "X-Ruby-Talk:\r\n\t<11152772-
> AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>\r\n\r\n"
>
> Is that not what I should be doing?
>
> James Edward Gray II
>
>

James Gray

10/30/2007 1:52:00 PM

0

On Oct 30, 2007, at 8:41 AM, Mikel Lindsaar wrote:

> No, you are doing it right. Looks like a bug. I'll get onto it.
>
> Added a bug report
> http://rubyforge.org/tracker/...
> func=detail&aid=15194&group_id=4512&atid=17370

Mikel, if you could email me (private is fine) when there's a new
version of TMail I could try that would be great. I would love to
try another deploy of my improved gateway code. Thanks.

James Edward Gray II