nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Implementation question: function or component for local mailbox?

2012-02-14 12:09:57
As previously discussed, I've been looking at putting the "From"
address in message draft via extensions to the format language (the
existing syntax doesn't have that ability).

can you expand on that? what is it that can't be done?

Weeeelll .... let me put it this way.  There is no function or component
today that corresponds to nmh's idea of what the "local mailbox" is.


I see two possibilities as to how to implement this:

- A new function, e.g. %(localmbox).

can't this be done now, with something like "%(profile Local-Mailbox)"?
(or similar -- my mh-format skilz are sketchy at best.)

Hm, I forgot about that.  But .... if you recall, this is what we
came up with in terms of "what my local mailbox is":

http://www.mhonarc.org/archive/html/nmh-workers/2012-02/msg00021.html

With %(profile Local-Mailbox) we can do the first one.  I don't
think we have any escapes that can do the others .... although ...
maybe I'm over-thinking this (which always happens).  We have %(me)
today.  We could easily add an escape to get "local hostname" (which
would be either localname from mts.conf or the output of "hostname").
So .... maybe we could get away with something like this:

From: %<(profile Local-Mailbox)%(putstr)%|%(myname) <%(me)@%(myhost)>%>

Where %(myname) would get the user's real name from either SIGNATURE or
the GECOS field, and %(myhost) would get the local hostname from
mts.conf (localname) or gethostname().  Hm, I'll have to parse ismymbox()
more closely to make sure that will DTRT.  I guess I was thinking that
having one entry point inside of nmh to create the idea of "the local
mailbox" might be more useful.

--Ken

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>