Skip to content

Add option message_show_address_comments to show comments when displaying address headers. - #10173

Open
listerr wants to merge 3 commits into
roundcube:masterfrom
listerr:fromheader-1
Open

Add option message_show_address_comments to show comments when displaying address headers.#10173
listerr wants to merge 3 commits into
roundcube:masterfrom
listerr:fromheader-1

Conversation

@listerr

@listerr listerr commented May 15, 2026

Copy link
Copy Markdown

This PR implements:

  • a configuration option $config['message_show_address_comments'] = true;
  • a user preference setting in Preferences -> Displaying Messages -> "Show comments in address headers"

Roundcube seems to over-sanitize when displaying From: headers, which can hide important information in the RFC5322 / RFC2822 comment part of the header.

Examples

RFC5322 / RFC2822 Header                                             | Before                          | After
---------------------------------------------------------------------|---------------------------------|------------------------------------------------------------------------------
Test User (test@domain.tld) <list@domain.tld>                        | Test User <list@domain.tld>     | "Test User (test@domain.tld)" <list@domain.tld>
Test User (via Test Mailing List) <list@domain.tld>                  | Test User <list@domain.tld>     | "Test User (via Test Mailing List)" <list@domain.tld>
Test User (via: Test, Mailing List) <list@domain.tld>                | Test User <list@domain.tld>     | "Test User (via: Test, Mailing List)" <list@domain.tld>
"\"test.user@domain.tld\"" (via Test Mailing List) <test@domain.tld> | "test.user@domain.tld" <test@domain.tld> | "test.user@domain.tld" (via Test Mailing List) <test@domain.tld>
root@domain.tld (Cron Daemon)                                        | (not displayed in RC 1.7.0)     | "root@domain.tld (Cron Daemon)" <root@domain.tld>
root                                                                 | (not displayed in RC 1.7.0)     | root
---------------------------------------------------------------------|---------------------------------|------------------------------------------------------------------------------

I don't think the last case of local-part with no domain name is strictly RFC compliant, but things like cron can often generate this header if the local MTA is broken, isn't configured with a domain, doesn't add a domain to From: headers missing a domain, for example.

The very neat new anti-spoofing warning feature isn't affected.

(I always enable $config['message_show_email'] globally and never allow users to turn it off.)

// Always show sender email address (not just name)
$config['message_show_email'] = true;

// don't allow users to change:
$config['dont_override'] = ['message_show_email' ];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant