Re: mail: Cannot parse address `[email protected] <[email protected]>'

Sergey Poznyakoff <[email protected]>
Newsgroups gmane.comp.gnu.mailutils.bugs
Organization GNU.org.ua
Message-ID <[email protected]>
Jean Louis <[email protected]> ha escrit:

> The problem is that the 'mail' utility does not recognize the email
> address as the valid mail part.

It is *not* a valid mail part to begin with.  According to RFC 2822
(page 14), a valid address is 

  name-addr       =       [display-name] angle-addr
  angle-addr      =       [CFWS] "<" addr-spec ">" [CFWS] / obs-angle-addr

display-name is defined as

  display-name    =       phrase

"phrase" is (page 12)

  phrase          =       1*word / obs-phrase
  word            =       atom / quoted-string

Now, atom is defined on page 11 as a sequence of alphanumeric characters
or some punctuation characters.  The @ sign is not among that list.

  
> Maybe there is a workaround?

Either don't include display-part at all, or enclose it in double
quotes:

(1) mail [email protected]

(2) mail "\"[email protected]\" <[email protected]>"

Regards,
Sergey
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.