[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nmh-workers] Handling empty components
From: |
Bob Carragher |
Subject: |
[nmh-workers] Handling empty components |
Date: |
Wed, 20 Mar 2019 17:54:59 -0700 |
Is there a concise way to specify "if X is not present or is just
white space?" in one's replcomps?
The "X" in my case is the "Reply-To" component, and I recently
received for the first time ever a message that contained an
_empty_ one (and that I wanted to reply to) -- i.e.
From: address@hidden
To: address@hidden
Reply-To:
[...]
Note: there is a space character after the "Reply-To:" above.
(If I remove the space, then the "Reply-To" component is seen as
empty, as expected.)
My replcomps is (I think) pretty standard, and starts with:
%(lit)%(formataddr %<{reply-to}%?{from}%?{sender}%?{return-path}%>)\
%<(nonnull)%(void(width))%(putaddr To: )\n%>\
This results in NMH generating a reply with _no_ "To:" header
because of the "(nonnull)" check. At least, that is my guess --
the mh-format(5mh) man page says that nonnull checks whether the
str register is "non-empty."
I'm guessing I can add a bunch of "(nonnull)" checks when trying
to find the address for the "To:" header, but I'm wondering if
there is a better, more compact option. Also, this is the first
time in nearly 30 years of using (N)MH that I've encountered this
situation, and I don't want to complicate my setup for such a
rare problem.
Thanks!
Bob
- [nmh-workers] Handling empty components,
Bob Carragher <=
- Re: [nmh-workers] Handling empty components, Ralph Corderoy, 2019/03/21
- Re: [nmh-workers] Handling empty components, Ken Hornstein, 2019/03/22
- Re: [nmh-workers] Handling empty components, Bob Carragher, 2019/03/22
- Re: [nmh-workers] Handling empty components, Ken Hornstein, 2019/03/22
- Re: [nmh-workers] Handling empty components, Ken Hornstein, 2019/03/22
- Re: [nmh-workers] Handling empty components, Bob Carragher, 2019/03/23
- Re: [nmh-workers] Handling empty components, Ken Hornstein, 2019/03/23
- Re: [nmh-workers] Handling empty components, Bob Carragher, 2019/03/30
- Re: [nmh-workers] Handling empty components, Ralph Corderoy, 2019/03/30