Bug 253759 - send mail does not quote GECOS information for From header
Summary: send mail does not quote GECOS information for From header
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.2-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-22 11:12 UTC by Michael Osipov
Modified: 2021-02-22 11:12 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Osipov 2021-02-22 11:12:12 UTC
My GECOS field contains the following data: "LDA CaFE (DW) Service User Admin"
The sendmail is used to send e-mails. The "From:" is constructed literally: "LDA CaFE (DW) Service User Admin <root>" and delivered via SMART_HOST but the parentheses never arrive at the target.

When looking at rfc5322#section-3.2.3 the situation is quite clear: "(" and ")" are part of the specials production therefore section 3.2.4 says that the display-name must be quoted to avoid interpretations on the server side.

The request is either to test GECOS for these special chars or simply always quote GECOS information to avoid the loss of information.

Snippet from truss:
?Date: Mon, 22 Feb 2021 11:40:38 +0100 (CET)\nH?F?From: LDA CaFE (DW) Service User Admin <root>\nH?x?Full-Name: L