[Top][All Lists]

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

Re: [Nmh-workers] Forward/backward references in mail-aliases file

From: Bob Carragher
Subject: Re: [Nmh-workers] Forward/backward references in mail-aliases file
Date: Thu, 13 Apr 2017 05:09:14 -0700

Whoops, you are quite correct Ralph!  Somehow I had convinced
myself I was using backward references in my own aliases file.
Sigh, time to get more sleep, I think.  B-)  Thanks for clearing
things up for me!

By the way, in my "ancient" Ubuntu running nmh 1.5, the relevant
part of the man page for mh-alias(5) has for the example:

       Example Alias File:

            sgroup: fred, fear, freida
            b-people: Blind List: bill, betty;
            fred: address@hidden
            UNIX-committee: <unix.aliases
            staff: =staff
            wheels: +wheel
            everyone: *
            news.*: news

       The first line says that more aliases should immediately be read from
       the file /etc/nmh/BBoardAliases.  Following this, “fred” is defined as
       an alias for address@hidden, and “sgroup” is defined as an alias for the
       three names address@hidden, ”fear”, and ”freida”.

The example shows the correct order in defining sgroup and fred,
though the explanation below the example is incorrect (and is
identical to the latest version in Savannah).

Looks like it was Lyndon's commit in 2013 May 25 (commit ID
ff3060cefb460cce2174058eefff38b6e11ee2f1 ["Clean up mh-alias(5)
manpage."] that changed it, by moving the "fred" definition to
match the explanation:

     % git log ff3060ce | head -13
     commit ff3060cefb460cce2174058eefff38b6e11ee2f1
     Author: Lyndon Nerenberg <address@hidden>
     Date:   Sat May 25 20:14:04 2013 -0700

         Clean up mh-alias(5) manpage.

         Word-smithing, update to use *.example domains for addresses,
         literal text in bold rather than italic, use typographers quotes on
         single character references, etc.

         Re-organize sections to match documentation convention.

         Mark "*" address-group as obsolescent.
     % git diff ff3060ce^ ff3060ce | grep -B 5 -A 8 fred | head -14
     +Example Alias File
      .RS 5
     +fred: address@hidden
      sgroup: fred, fear, freida
      b-people: Blind List: bill, betty
     -fred: address@hidden
      UNIX\-committee: <unix.aliases
      staff: =staff
      wheels: +wheel
     -everyone: *
      news.*: news

In that same commit, the explanation of the news.*: alias was
removed, as it was part of a 2-sentence paragraph that started
with the explanation of the everyone: alias (removed because the
match-everything "*" option was made obsolete):

       Finally, “everyone” is defined as all users with a user-id in
       /etc/passwd greater than 200, and all aliases of the form
       “news.<anything>” are defined to be “news”.

(There were many other changes to this man page in this commit.)


On Thu, 13 Apr 2017 12:02:58 +0100 Ralph Corderoy <address@hidden> sez:

> Hi Bob,
> I agree the man page example doesn't seem to match the page's
> definition, but I think the example and the explanation that follows is
> wrong.
>     $ sed 4q ~/mail/aliases
>     x1: x2
>     x2: address@hidden
>     x3: address@hidden
>     x4: x3
>     $
>     $ ali | grep '^x[1-4]:'
>     x1: address@hidden
>     x2: address@hidden
>     x3: address@hidden
>     x4: x3
>     $
> x1 is a forward reference and gets fully expanded.
> x4 is a backward reference and does not.
> I'm confused by mh-alias(5) saying
>     In match, a trailing “*” on an alias will match just about anything
>     appropriate.
> What `match'?  mh-format(5)'s function match()?  No, it seems to mean
> the match that's done to find the alias definition.
> And then the example you quoted ends
>     news.*: news
> but that isn't explained in the following text.  A brief experiment:
>     $ sed 2q ~/mail/aliases
>     news: oldnews
>     news.*: news
>     $ ali news
>     oldnews
>     $ ali news.
>     news
>     $ ali news.foo
>     news
>     $
> --
> Cheers, Ralph.
> https://plus.google.com/+RalphCorderoy

reply via email to

[Prev in Thread] Current Thread [Next in Thread]