I just found your post while searching, and the {$post.post_id} in your post does seem to give me the message ID for each message in a thread when inserted into the message template. So even though I cannot help you with what you are trying to get (not clear on where you are trying to get the anchor parameter) but you've helped me on my question to go the other direction, so thank you!)