As a second step, I would like to to use a cgi script to POST
addressfragments available by the MailToURL resource.
<MailToURL>
URL-template
<MSGFOOT>
I build the form to call the cgi in <MSGFOOT>, but then the functionality of
<MailToURL> is not active.
Can I use <MailToURL> anywhere in the HTML page?

No. The documentation for the resource states it only deals with
addresses in message headers.

How canI define my own "URL-template"?

You have use of all the resource variables available to create whatever
"URL-template" you desire. You can define a custom resource variable
via the DEFINEVAR resource if you want to reference your template
in multiple locations. For example:
<DefineVar>
MY-REPLY-TO_FORM
<form action="/cgi-bin/reply.cgi">
<input type="hidden" name="local-part" value="$FROMADDRNAME$">
<input type="hidden" name="domain-part" value="$FROMADDRDOMAIN$">
<input type="hidden" name="human-name" value="$FROMADDRNAME$">
<input type="hidden" name="ref-msgid" value="$MSGID$">
<input type="hidden" name="subject" value="$SUBJECTNA$">
<input type="submit" name="Reply>
</form>
</DefineVar>
Then, whenever you want to place the form somewhere on a page, just
use $MY-REPLY-TO_FORM$.
--ewh