Web page hosting and cheap domain registration service
  

 

replcomps before MH 6.8

[table of contents] [index]

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:

  • If (%<) the original message has a Reply-to: field in the header ({reply-to}), take that address.
  • Else (%|), start another test:
    • If (%<) the original message has a From: field ({from}), take that address.
    • If that's not true, start yet another nested test for a Sender: field and use it if it exists.
    • Finally, there's one last check for a Return-Path: field.
  • A test always ends with %>. So, four nested tests will end with %>%>%>%>.

If none of those tests found the address they needed, we don't have a To: address for the reply.

Line 2 starts with a test (%<) that runs the (nonnull) function to see whether formataddr saved an address in line 1. If so, %(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.

Click here to go back to the main thread. It explains the rest of the lines of all recent versions of the default replcomps file.

[Table of Contents] [Index] [Return to: start of MH 6.8 replcomps explanation]


 

 

 

 

Cheap domains registrar | Buy domain name & domain registration | Domain registration 

Disclaimers: This document is provided as free service for the benefits of Active-Venture.com's web hosting customers only.

 
Quotes: Anyone who proposes to do good must not expect people to roll stones out of his way, but must accept his lot calmly, even if they roll a few stones upon it.