From: Ken Hornstein Date: Mon, 27 Feb 2012 18:37:09 +0000 (-0500) Subject: Update digestcomps and forwcomps with comments and better formatting. X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=1f9cbd73830742dc7039f53b8672d8a5aaf75c11;p=mmh Update digestcomps and forwcomps with comments and better formatting. --- diff --git a/etc/digestcomps b/etc/digestcomps index 5b310d5..19d97ac 100644 --- a/etc/digestcomps +++ b/etc/digestcomps @@ -1,6 +1,18 @@ -%<{nmh-from}%(void(width))%(putaddr From: )%|From: %{digest}-Request%> -%<{nmh-to}%(void(width))%(putaddr To: )%|To: %{digest} Distribution: dist-%{digest};%> -Subject: %{digest} Digest V%(cur) #%(msg) +%; +%; digestcomps - the component template file used when doing "forw -digest" +%; +%; What happens here is the following: +%; +%; - Try to make reasonable defaults when using -digest +%; - Allow users to override headers if they give them +%; +%; See forwcomps for more details on how this works +%; +%<{nmh-from}%(void(width))%(putaddr From: )%|From: %{digest}-Request%> +%<{nmh-to}%(void(width))%(putaddr To: )%|To: %{digest} Distribution: dist-%{digest};%> +%<{nmh-cc}%(void(width))%(putaddr cc: )\n%>\ +%<{fcc}Fcc: %(putstr)\n%>\ +Subject: %<{nmh-subject}%(putlit)%|%{digest} Digest V%(cur) #%(msg)%> Reply-To: %{digest} -------- %{digest} Digest %(weekday{nmh-date}), %2(mday{nmh-date}) %(month{nmh-date}) %(year{nmh-date}) diff --git a/etc/forwcomps b/etc/forwcomps index fdfb23b..4d9f192 100644 --- a/etc/forwcomps +++ b/etc/forwcomps @@ -1,6 +1,32 @@ +%; +%; forwcomps - Our components file when we're using "forw" +%; +%; We want people to be able to use the components from forwarded +%; messages in this file, so we have to cheat a bit. We create a series +%; of pseudo-components with a "nmh" prefix to represent arguments given +%; on the command line. We don't do this for %{fcc} since there's already +%; precedence for this from "repl". +%; +%; If we're given multiple messages to forward, provide the components +%; from the first one. Can't really think of anything better to do there. +%; +%; Generate a "From:" header; if we don't give one, use %(localmbox) +%; %<{nmh-from}%|%(void(localmbox))%>%(void(width))%(putaddr From: ) +%; +%; Generate To: and cc: headers; if we're given ones, put something in there +%; otherwise leave them blank. +%; %<{nmh-to}%(void(width))%(putaddr To: )%|To:%> %<{nmh-cc}%(void(width))%(putaddr cc: )%|cc:%> +%; +%; If we're not given a -fcc switch, then default to +outbox +%; Fcc: %<{fcc}%(putstr)%|+outbox%> +%; +%; If we're not given a -subject switch, then use the original message +%; subject, but adding (fwd) on the end. I got this idea from exmh, and +%; I've always liked it. +%; Subject:%<{nmh-subject} %(trim)%(putlit)%?{subject} %(trim)%(putlit) (fwd)%> --------