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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 01, 2015 at 07:43:08AM -0400, Allen Hubbe wrote:
> On May 31, 2015 at 6:29 PM, Eric Sunshine <sunshine@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxx>
---
 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 ---
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]