[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] customizing templates
From: |
Ken Hornstein |
Subject: |
Re: [Nmh-workers] customizing templates |
Date: |
Wed, 14 Sep 2016 10:25:37 -0400 |
>hi there. Just started using nmh and I must say I love it.
Well, thanks! Always good to have a new user.
>I'm at the stage where I'd like to customise the templates a little.
So, these are written in a kind of strange little language. It's documented
relatively completely in mh-format(5). As of 1.6 we include fmttest(1)
which you can use to help debug your format script.
>My components template file has the line
>
>%<{from}%|%(void(localmbox))%>%(void(width))%(putaddr From: )
>
>How can I change that to: "for From: use the address passed
>as the -from switch, or use address@hidden
Well, that already pretty much does that. The %(localmbox) entry uses
the Local-Mailbox profile entry (there is a fallback generated based on
your local username and hostname). So if you put:
Local-Mailbox: My Name <address@hidden>
It should do exactly what you want.
>In the same way, my replcomp template has the line
>
>%(void(localmbox))%(void(width))%(putaddr From: )
>
>How can I change that to: "for From: use the "Delivered-to:"
>header or address@hidden
Well, the manual would explain that, but it's pretty dense. Here's
something that should work:
%<{delivered-to}%|%(void(localmbox))%>%(void(width))%(putaddr From: )
Again, check out mh-format(5) and fmttest(1); the former explains the
syntax, the latter shows you what the script is doing. You also might find
the information in Jerry Peek's book useful; it's old, but most of it is
still relevant:
http://rand-mh.sourceforge.net/book/
--Ken