bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC 822 address parsing API


From: Sam Roberts
Subject: Re: RFC 822 address parsing API
Date: Sun, 11 Mar 2001 15:27:41 -0500
User-agent: Mutt/1.3.16i

Quoting Alain Magloire <address@hidden>, who wrote:
> > There's some things I have to do still, and some questions I have.
> > 
> > 1)
> > 
> > Do you really want/need to collect comments?
> 
> It can be a source of valuable information for certain type
> of applications.  For example, some smart filters will parse the comments
> in the "Received:" header to diagnose problems.
> But in our current state, no it is not a high priority.

I was talking specifically about when parsing addresses. I skip
comments and whitespace while parsing addresses, but one of my
822 parsing functions is GetComment(), it gets the contents of
of a comment and you'd use it while parsing "Received" fields,
if you wished. I could collect comments while parsing address
fields, I just don't want to, except in the unfortuneate case
below.

> > 2)
> > 
> > If the goal of (1) is to support the non-rfc compliant use of
> > a comment after an addr-spec to indicate the display name, how about I
> > modify the RFC syntax from section 6.2 to be:
> > 
> > mailbox = addr-spec "(" comment ")"
> >     / phrase route-addr
> > 
> > ALL comments in headers containing comments are deprecated in drums,
> > but parsing this ugliness would be easy and useful, I think.
> > 
> > Also, hiding it from the user, so comment was mapped into personal
> > if phrase wasn't present would be good.
> > 
> > Yea or Nea?
> 
> I do not know, yet.  But you seem to have a better grasp of the
> rfc822 syntax.  One question in the mailbox above "phrase" does not
> seem to be optionnal, it was alway my understan that "phrase" is optional
> Alain Magloire <address@hidden>

Was that supposed to be an example of optional? ;-)

The rfc says:

mailbox = addr-spec / phrase route-addr

phrase = 1*word

word = atom / quoted-string

atom = 1*<non-specials>

quoted-string = <"> ... <">

So, the phrase isn't optional. Funny you should mention this, though.
I just emailed drums to ask about the history of the comment after
and addr-spec hack, it seems so pointless given that there is a perfectly
good syntax for expressing the same thing, and here's the first
message from the drums mailing list I pulled up when looking for the
drums address:

X-Mailer: Eudora [Macintosh version 4.3a?]
From: Pete Resnick <address@hidden>
Subject: Re: Q re schedule and (premature?) implementation of drums-msg-fmt
Cc: <address@hidden>

Pete's the author of drums, the draft update to the message format spec
(rfc822).

Anyhow, I checked the internet draft, and it says the phrase is
optional now, so I'll add that to my to-do list. 

> > 3)
> > 
> > The [route] part of a route-addr, parse and discard, I assume?
> > 
> > 4) domain-literals
> > 
> > Should I leave [127.0.0.1] as a domain-literal? Or should I strip
> > the [] and pretend the ip address is a domain? What would an
> > smtp server prefer (since the email part should, I think, be
> > acceptable as an address in an smtp dialog)?
> 
> A very good question,  in the case of IMAP an address is :

I'll read through IMAP and SMTP again. It looks like they both
like the []s left on.

>  ... its snowing here ... sigh... I have to dig out my way out again.

Good. :-P

I'm thinking of going to visit friends near ottawa in a few
weeks, and I want to skate on the canal, which I've never done,
and I was afraid it would melt.

Sam

-- 
Sam Roberts <address@hidden> (http://www.emyr.net/Sam)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]