git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/9] send-email: further document missing sendmail aliases functionality

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jun 1, 2015, 18:22 UTC
Message-ID
<20150601182236.GA28030@flurp.local>
In-Reply-To
<CAJ80sau0GeeFxFZYsEE=uupfPqJ=vRZfNRuNd0qRJPDNvnbMPw@mail.gmail.com>
On Mon, Jun 01, 2015 at 07:43:08AM -0400, Allen Hubbe wrote:
Show 9 quoted lines
> On May 31, 2015 at 6:29 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:
> > Sendmail aliases[1] supports expansion to a file ("/path/name") or
> > pipe ("|command"), as well as file inclusion (":include: /path/name"),
> > however, our implementation does not support such functionality.
>
> According to the documentation, the parser should print a warning for
> any explicitly unsupported constructs.  These are now explicitly
> unsupported, so the parser should warn on |, /, and :include: .
> Perhaps the lines that match should be ignored like the others, too.

Indeed. I had that in mind and then promptly forgot about it. Here's a follow-on patch:

--- >8 ---
From: Eric Sunshine <sunshine@sunshineco.com>
Subject: [PATCH 10/9] send-email: further warn about unsupported sendmail aliases features

The sendmail aliases parser diagnoses unsupported features and unrecognized lines. For completeness, also warn about unsupported redirection to "/path/name" and "|command", as well as ":include:".

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---
 git-send-email.perl | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/git-send-email.perl b/git-send-email.perl
index eb1d678..ae9f869 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -492,6 +492,10 @@ sub parse_sendmail_alias {
 	local $_ = shift;
 	if (/"/) {
 		print STDERR "warning: sendmail alias with quotes is not supported: $_\n";
+	} elsif (/:include:/) {
+		print STDERR "warning: `:include:` not supported: $_\n";
+	} elsif (/[\/|]/) {
+		print STDERR "warning: `/file` or `|pipe` redirection not supported: $_\n";
 	} elsif (/^(\S+?)\s*:\s*(.+)$/) {
 		my ($alias, $addr) = ($1, $2);
 		$aliases{$alias} = [ split_addrs($addr) ];
-- 
2.4.2.538.g5f4350e

--- >8 ---
Previous: Allen HubbeNext: Allen Hubbe
Message 4 of 15 in “send-email: add sendmail aliases line continuation support”
  1. 0/9 send-email: add sendmail aliases line continuation supportEric Sunshine, May 31, 2015
  2. 1/9 send-email: further document missing sendmail aliases functionalityEric Sunshine, May 31, 2015
  3. Allen HubbeJun 1, 2015
  4. Eric SunshineJun 1, 2015
  5. Allen HubbeJun 1, 2015
  6. 2/9 send-email: visually distinguish sendmail aliases parser warningsEric Sunshine, May 31, 2015
  7. 3/9 send-email: drop noise comments which merely repeat what code saysEric Sunshine, May 31, 2015
  8. 4/9 send-email: fix style: cuddle 'elsif' and 'else' with closing braceEric Sunshine, May 31, 2015
  9. 5/9 send-email: refactor sendmail aliases parserEric Sunshine, May 31, 2015
  10. 6/9 send-email: simplify sendmail aliases comment and blank line recognizerEric Sunshine, May 31, 2015
  11. Eric SunshineJun 1, 2015
  12. 7/9 send-email: implement sendmail aliases line continuation supportEric Sunshine, May 31, 2015
  13. 8/9 t9001: refactor sendmail aliases test infrastructureEric Sunshine, May 31, 2015
  14. 9/9 t9001: add sendmail aliases line continuation testsEric Sunshine, May 31, 2015
  15. Allen HubbeJun 1, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.