[Top][All Lists]

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

Re: [Nmh-workers] Feature requests (or explanation of how to do 'em if a

From: Ken Hornstein
Subject: Re: [Nmh-workers] Feature requests (or explanation of how to do 'em if already there)
Date: Fri, 24 Oct 2014 23:57:31 -0400

>1.  Most emails have both text and html parts nowadays.  If I'm reading such
>    a message want to store the html part it always stores it with a .txt 
> suffix.
>    And, because browsers don't actually look at the contents, they treat it as
>    a text file instead of a html file so I have to rename the file.  Would be
>    nice if it stored it with a .htm or .html suffix.

FWIW, yeah, that totally bugs me as well.  It's on my list of things to fix
(but I'm kinda busy now, so it won't happen for a while).  In theory, I would
think it would be relatively easy, but I just have to trawl through a bunch
of code to figure out how that works.

>2.  I have a whole pile of mail aliases for myself in my domain that I use for
>    communications with different parties. I usually create a new one for every
>    merchant with whom I do business.  If I receive an email directed to one of
>    these aliases and reply to it it uses my address instead of the alias in 
> the
>    from and I always have to change it.  Would be nice if it used the incoming
>    address.

You can actually do that now, with the existing format files.  Okay, yes,
the format language isn't wonderful, but you can use fmttest(1) to help
you debug that now.  This message actually uses that technique.  You
probably want something like:

From: %{to}

in there.  Or maybe:

From: Jon Steinhart %(addr{to}))

But you can also do something like this:

%<{delivered-to}%<(match address@hidden)
From: Ken Hornstein <address@hidden>
%(void(num 1))%|(void(num))%>%>
From: Ken Hornstein <address@hidden>

Okay, there's more there, but I omitted it.  It's a bit wonky because
pobox.com will set a delivered-to header, but I didn't want to change
the address for any header, only if it's got my email address in it.
That's why I set the num register to indicate later on if I'm supposed to
put out my "fallback" email address.  If you don't need a multi-stage
test then you could simply have a sequence of %< .. %? .. %? .. %| .. %>.
I know, I know ... it looks complicated, but fmttest(1) does include
a -trace function if you get too confused (and -dump to dump out the
complete mh-format(5) program).

If you can't really make it happen inside of repl using mh-format(5),
you could write a wrapper to repl that sets an environment variable and
uses %(getenv).


reply via email to

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