ietf-smtp
[Top] [All Lists]

Re: RFC 5321 VRFY and quoting syntax

2011-05-11 08:37:42

I think that is it saying for INPUT, you can take either the angle bracket or non-angle bracket form, but for OUTPUT it MUST be shown in angle bracket form. It is analogous to looking up someone by name in a phone book - ultimately it is the single output form - telephone #

Yes, I agree that in many areas of software, the term QUOTE can be mixed up with the idea of ESCAPING. In my opinion, ESCAPING is the proper communications term as it used in many data communications protocols.

   http://www.google.com/search?q=define:character+escaping

For VRFY, EXPN, the escaping "\" (SLASH) character is used to escape the next character which could be a formal delimiting character to separate multiple inputs. For example:

   VRFY   santos,hector,shane,cory(_at_)localhost(_dot_)com

This would be would be four "local account" user name changes,

  santos
  hector,
  shane,
  cory(_at_)localhost(_dot_)com

And depending on the host on how it looks up users, it be by some name or even address. Some systems (like ours) has three identities per user account; A number ID, user name and email address. And the user name may have an old school MHS format (first.last), and in addition it may take into account the possible internal translations a system may have like BOSS, PRESIDENT, SYSOP, SUPPORT etc.

Versus:

   VRFY  santos\,hector,shane,cory(_at_)localhost(_dot_)com

which would be three accounts to look up:

   santos,hector
   shane
   cory(_at_)localhost(_dot_)com

--
Sincerely

Hector Santos
http://www.santronics.com


A. Rothman wrote:

Hi,


I was hoping someone can shed some light on the proper syntax an SMTP server should use according to RFC 5321 in the following cases:


1. The syntax definition for commands such as VRFY and EXPN (e.g. section 4.1.1.6) is

vrfy = "VRFY" SP String CRLF

with the syntax of "String" defined in section 4.1.2 as:

String         = Atom / Quoted-string

however, section 3.5.1 states:

   The character string arguments of the VRFY and EXPN commands cannot
   be further restricted due to the variety of implementations of the
   user name and mailbox list concepts.

What is not entirely clear to me is which is true - is any string of characters valid (syntax-wise), or must it be a Quoted-string (in double quotes) if any non-atext characters appear in it. This is especially confusing having seen various examples online (and some discussions on this mailing list as well) where pointed brackets are included in the VRFY argument (using a Path syntax similar to the one defined for the MAIL FROM and RCPT TO commands), but with no quoting.

2. Section 4.1.2 defines the backslash-escaped character mechanism in quoted-pairSMTP, which is used only in a Quoted-string (within double-quotes), and does not mention such escaping outside of a Quoted-string. The following text section states:

   Note that the backslash, "\", is a quote character, which is used to
   indicate that the next character is to be used literally (instead of
   its normal interpretation).  For example, "Joe\,Smith" indicates a
   single nine-character user name string with the comma being the
   fourth character of that string.

So, it is unclear whether this paragraph applies only to the Quoted-strings defined above, or to any characters in any argument to any command, or only to mailboxes (discussed in the preceding paragraph) or some other definition of when it does and does not apply.

3. Still regarding VRFY (and maybe also EXPN?) section 3.5.1 states:

   If a normal (i.e., 250) response is returned,
   the response MAY include the full name of the user and MUST include
   the mailbox of the user.  It MUST be in either of the following
   forms:

      User Name<local-part@domain>
      local-part@domain

Whereas section 3.5.2 claims:


   When normal (2yz or 551) responses are returned from a VRFY or EXPN
   request, the reply MUST include the<Mailbox>  name using a
   "<local-part@domain>" construction

Notably, the second example in the former section does not comply with the latter section (as it contains no pointed brackets). Which is the correct form?


Any clarification would be greatly appreciated - thanks!


Amichai