Below is the format of replcomps lines 1-2 before MH 6.8. Or, here is the explanation for MH version 6.8 and later.
Lines 1 and 2 of the default replcomps file look like this before MH version 6.8:
%(lit)%(formataddr %<{reply-to}%|%<{from}%|%<{sender}%|%<{return-path}%>%>%>%>)\
%<(nonnull)%(void(width))%(putaddr To: )\n%>\
Those lines look for the best address in the original message.
The %(lit) erases a storage register that'll hold the
address. The %(formataddr ...) formats an address
and stores it in the register. The rest of line 1, the argument
to formataddr, chooses the address:
%<{reply-to}%|%<{from}%|%<{sender}%|%<{return-path}%>%>%>%>
It's several nested if-else tests. It means:
Line 2 starts with a test (%<) that runs the (nonnull) function to see whether formataddr saved an address in line 1. If not, the test fails and line is skipped; no To: field is output. Otherwise, %(void(width)) saves the width of the address. (The Section scan Format Strings has more information about the string and numeric registers where those values are saved.) The %(putaddr To: )\n uses a function named putaddr. It gets the address field that was saved in line 1 and prints To: followed by the address and a newline character (\n). We've got the To: address, if any; the %> ends the test.
This file is from the third edition of the book MH & xmh: Email for Users & Programmers, ISBN 1-56592-093-7, by Jerry Peek. It is freely available; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For more information, see COPYING.
|
Copyright © 1991, 1992, 1995 O'Reilly Media, Inc. Copyright © 1996, 1997, 1999, 2000, 2002, 2004 Jerry Peek Last modified: 2006-05-31 15:13:43 -0700 |
|