send-email: further warn about unsupported sendmail aliases features
authorEric Sunshine <sunshine@sunshineco.com>
Mon, 1 Jun 2015 18:22:36 +0000 (14:22 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Jun 2015 22:53:19 +0000 (15:53 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl
index eb1d678fb016d0918caf96897a89ecba9ed4fc47..ae9f8698c5a4842c2c0d63db51dde067ddeeb1c9 100755 (executable)
@@ -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) ];