Bug 164302 - [patch] mail(1) expands aliases beyond #
Summary: [patch] mail(1) expands aliases beyond #
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-19 06:30 UTC by Stefan
Modified: 2017-12-31 22:32 UTC (History)
0 users

See Also:


Attachments
file.diff (534 bytes, patch)
2012-01-19 06:30 UTC, Stefan
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan 2012-01-19 06:30:11 UTC
I'm not sure if this is a bug or a feature. For, me, it's a bug :) 

/usr/bin/mail parses ~/.mailrc and expands aliases in an unexpected way, e.g. for such an entry

--- snip ---
alias stefan   important@internet.com  # that's me
--- snip ---

/usr/bin/mail sends out email to 4 recipients:

1. important@internet.com
2. #
3. that's
4. me

I'm also using emacs/rmail which expands aliases from ~/.mailrc, but only up to the #. That's more intuitive.

Fix: A fix could stop reading beyond # in usr.bin/mail/list.c:getrawlist(). See attachment.

Patch attached with submission follows:
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:13 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped