Re: [PATCH v4] send-email: Add simple email aliases format

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

 



On Fri, May 22, 2015 at 12:29 AM, Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote:
> On Thu, May 21, 2015 at 11:40 PM, Allen Hubbe <allenbh@xxxxxxxxx> wrote:
>> This format is more simple than the other alias file formats, so it may
>> be preferred by some users. [...]
>> Signed-off-by: Allen Hubbe <allenbh@xxxxxxxxx>
>> ---
>> diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
>> index 804554609def..38ade31e0c28 100644
>> --- a/Documentation/git-send-email.txt
>> +++ b/Documentation/git-send-email.txt
>> @@ -383,7 +383,29 @@ sendemail.aliasesFile::
>>
>>  sendemail.aliasFileType::
>>         Format of the file(s) specified in sendemail.aliasesFile. Must be
>> -       one of 'mutt', 'mailrc', 'pine', 'elm', or 'gnus'.
>> +       one of 'simple', 'mutt', 'mailrc', 'pine', 'elm', or 'gnus'.
>> ++
>> +If the format is 'simple', then the alias file format is described below.
>> +Descriptions of the other file formats to the following formats can be found in
>> +the documentation of the email program of the same name.
>
> The second sentence probably needs some proof-reading.

Could you be more specific?

>
>> ++
>> +This 'simple' format is is as follows.
>> ++
>> +       <alias>: <address|alias>[, <address|alias>...]
>> ++
>> +Aliases are specified one per line.  There is no line splitting.  Anything on a
>> +line after and including a `#` symbol is considered a comment, and is ignored.
>> +Blank lines are ignored.
>
> I'm not convinced that gratuitously diverging from the
> sendmail/postfix 'aliases' format is warranted. In particular, that

This isn't 'sendmail', as of v2.

> format recognizes a comment line only when '#' is the first
> non-whitespace character[1]; and does not consider '#' a
> comment-introducer anywhere else in the line. By recognizing '#'
> anywhere as a comment-introducer, you may be painting this format into
> a corner rather than leaving it open for someone later to extend it to
> be more sendmail/postfix-like by, for instance, supporting name
> quoting and line-continuation[1].

It depends what we want to do with this parser: accept existing
sendmail aliases files in git, or enforce that git alias files are
usable for sendmail.  I really don't expect the second to ever happen.
The first, maybe, but only if the alias file is edited to remove
aliases of pipes and maildirs etc.  The second may not work if we have
comments to the right, or aliases of aliases, which sendmail does not
claim to support.

I don't know what sendmail would actually do with a '#' elsewhere.  It
only talks about having '#' at the beginning of a line, or in the
alias name in quotes (which is not supported by this parser - proper
handling of quoted strings is not easy).  It doesn't say what sendmail
does with '#' if the name is not quoted, and it doesn't define a
meaning for '#' in the definition of an alias.  If these other cases
would be errors for sendmail, so what if they are not errors here?

>
> For the same reason, I'm not convinced that "simple" is a good name.

I was worried about that back in v1 before going to v2, but I really
don't have a strong opinion about the name.  I already changed the
name, at the suggestion of Junio. I'd like to hear a consensus from
you two, or a tiebreaker from a third, before I change it again.

> "sendmail" may indeed be a more appropriate name, even if it means
> that this early implementation documents it as (currently) a subset of
> the richer sendmail/postfix 'aliases' format. By doing so, we leave
> the door open so a future person can implement additional features to
> bring it closer to that format.

Or, a future person can write a sendmail parser that is closer to that format.

>
> [1]: http://www.postfix.org/aliases.5.html
>
>> ++
>> +Example of the 'simple' format:
>> ++
>> +       alice: Alice W Land <awol@xxxxxxxxxxx>
>> +       bob: Robert Bobbyton <bob@xxxxxxxxxxx>
>> +       # this is a comment
>> +          # this is also a comment
>> +       chloe: chloe@xxxxxxxxxxx
>> +       abgroup: alice, bob # comment after an alias
>> +       bcgrp: bob, chloe, Other <o@xxxxxxxxxxx>
--
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]