[Top][All Lists]

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

Re: superfluous(?) quotes in mail alias expansion

From: Gregor Zattler
Subject: Re: superfluous(?) quotes in mail alias expansion
Date: Wed, 22 Mar 2023 22:13:01 +0100

Hi Emanuel,
* Emanuel Berg <> [2023-03-21; 15:24 +01]:
> Gregor Zattler wrote:
>> the fine manual has this to say regarding mail aliases:
>>    If an address contains a space, quote the whole
>>    address with a pair of double quotes, like this:
>>         alias jsmith "John Q. Smith <>"
>>    Note that you need not include double quotes around
>>    individual parts of the address, such as the
>>    person’s full name.  Emacs puts them in if they are
>>    needed.  For instance, it inserts the above address
>>    as ‘"John Q. Smith" <>’.
>> This describes correctly how this mechanism works,
>> regarding it's outcome, but not why.
> In the data file, it's just so it can be parsed. When it gets
> inserted, quotes are added if they are needed.
> Try putting it like this in ~/.mailrc:
> alias jsmith-1 "John Q. Smith <>"
> alias jsmith-2 "John Q Smith <>"
> alias jsmith jsmith-1 jsmith-2
> then expand both with "jsmith", it will look like this:
> To: "John Q. Smith" <>,
>  John Q Smith <>
> Quotes inserted (because of the dot) in the first case, not in
> the second as not needed.

I see, thanks.  But why does the dot need quoting?  I
tried to understand RFC 5322 section 3.4, and 4.1 which
if I understand correctly allowed for a dot at this
part of the To: Header, but only so since ~10 years.

OK, I'm convinced that it then is more conservative to
send with the quotes.

Anyway I did a test: An email from one system to
another with

John Q. Smith

unquoted in the To: header arrived.  The display-name
part was not quoted in the copy which came through all
the smtp hops.  But notmuch as mutt show this message
with quotes around the display-name.

Goodbye, Gregor

reply via email to

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