From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregor Zattler Newsgroups: gmane.emacs.help Subject: Re: superfluous(?) quotes in mail alias expansion Date: Wed, 22 Mar 2023 22:13:01 +0100 Message-ID: <875yas7an6.fsf@no.lan> References: <87a606b40f.fsf@no.lan> <87h6ueqj12.fsf@dataswamp.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30828"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 22 22:14:14 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pf5mf-0007pO-W3 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 22 Mar 2023 22:14:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pf5mC-0000kV-Sv; Wed, 22 Mar 2023 17:13:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pf5mA-0000k6-Cm for help-gnu-emacs@gnu.org; Wed, 22 Mar 2023 17:13:42 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pf5m7-0000Re-M8 for help-gnu-emacs@gnu.org; Wed, 22 Mar 2023 17:13:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1679519616; i=telegraph@gmx.net; bh=aOA54jkSZNTMEAAWhcIdTMQjTSEM/0Cb/LbMM+GKvtA=; h=X-UI-Sender-Class:From:To:Subject:In-Reply-To:References:Date; b=tnkO5o6KbYqxis3iUv59frBGAB62I3OejEguXE9m2DusSacJVvbSN32WtjkJeMdZz rlDMZ0TVKXXVj5qgwMjgjKUDoG1roMZ7te6R6eUuvhmnlj/62YvLUQRvoAOT3lPS3H lwfM+6IvosmyQ/u63KDvFVCiohTiFslnLAfrsw2GbdBjjjxf+FrYvdyxwcDehN8E7Z gv5hCnpoSz6GmVs0h2VoXaWwoph/ONw6UtfX9vAXpOJbxeh1W4UrECxDa9RlS9kbUv uTHgTQ614Jyiq5sj/MleplKJxRYJ6J7IRSNumqglWN+hUhfCkZK2yj7V5hnE7DV6WH AGmMvdR1DE9ag== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from localhost ([95.90.234.37]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1McH9Y-1qDJXA0Us0-00cifp; Wed, 22 Mar 2023 22:13:36 +0100 In-Reply-To: <87h6ueqj12.fsf@dataswamp.org> Mail-Followup-To: help-gnu-emacs@gnu.org X-Provags-ID: V03:K1:NhTl7mehHFomGL9PbmRbZM5zfJv4tatdDaTr6X07L9FphMQD0ed eE1euALBxruDH6SKSNUFejEg2Edp1vVTLLuZuLAreZDsbMluDhC0GSsMGTrnkBDJdC1x9Vt YqJBW4ihwFpWsr6SULH9ZPFtSi+k0nNQ9iXz5Wt2B7ZVHt2/g/aRJDdDnk/cu0V91PoQjuq kuR/AVixtuVAbsmP/3vuQ== UI-OutboundReport: notjunk:1;M01:P0:lQNQG6ULg7A=;2pvVljUY7W480BGWalmXkwaUNR7 +ayLJbqEv1OT8Fneg4I+rOarZAedcoKvyQz9llkY3+CqG0zWgeS8ahcoMX4jcxKgnyeNQjASs EZd1tFLtuE7icbGN4lzXsaHTi3GPs+txrpCDCygfyHc3/FoP33lWyV2YH76T0YmsSsZhKA1NN rYUgvNwZqi7AMc43Sap/1JI0+SgoctuNB2B/vozvxDSe3zKzep/eON2i7t0J+2n/Y7uzF1FXs ZI95RnftKjXz+3BuBSEGtSg0lYXFTzK0kw9/LS9UyxcROb2P0R491K79Ch3QWGdScKT33Tn7X 2GYkaWmSoTxfOuntn8i58ucAvkRQk6UlA86i8bKPyekYH/DOS6sdstSLaykP2YWvYS0OeR1os 0rbrSrtasLhKLKVTQM/ra2bhR+cC5akSICmXfUXwEGAprjXm5n1JMm6OmKwuQShWid7/HYKl8 IxQPP+1hZcda6mG5u+RLFnVjChPQui3/0J7KPxCJdXUZ9bHPuDGHyOnnCwgXY2lrdbZuo5WCv Lyrtguyb77VrQ7U+Vh1XXexXUmkzqgLbBZJ7y/UV2oUpte2kgaj7zpTzPFA3jgClnEIXULTqu IK7KzqoCDjHN010NuNWyctZpyM9jt8DzLLX0uV99/txO/6yPsRwl/eYHQ5UDI73YxN4Caw8WI Ve0NMmVUj9FEpTkfnGaZFIplYPj3Ami0J9JJEw7r2OgrjrVVcHEB3E7+Sm9vPPOm/HpVD4Add y48weZWdc6I97fLNmBxdvFyroAeWs2bOcxwR8KOn8QMfC/JtXir+AIrlxYkDe2MiHBsx9roN Received-SPF: pass client-ip=212.227.17.21; envelope-from=telegraph@gmx.net; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143089 Archived-At: 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=E2=80=99s full name. Emacs puts them in if they are >> needed. For instance, it inserts the above address >> as =E2=80=98"John Q. Smith" =E2=80=99. >> >> 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