Q: How can I make LISTSERV treat replies differently from original messages?
By Jacob Haller Senior Support Engineer, L-Soft
We occasionally get inquiries from list owners who would like their mailing lists to treat replies differently from original messages. For instance, they want people to be able to post original messages without moderation, while having reply posts moderated – or the other way around.
Unfortunately, there isn't a foolproof way for LISTSERV to distinguish between an original message and a reply. With that said, typically replies share some common characteristics that you can use to your advantage.
For instance:
- As you have likely observed, many email programs put "Re:" at the beginning of the subject line of replies (though not all do).
Subject: Re: First message!
- Many modern email programs also insert a "References:" header that points to the message IDs of previous messages in the conversation.
References: <6A0049A9-582F-4DC5-968F-8D620AADC8A0@example.org>
- Some also use an "In-Reply-To:" header that contains the message ID of the original message to which the current message is a reply.
In-Reply-To: <BN1PR01MB1977CC5C582AF6447CF37C4E5650@BN1PR01MB197.prod.example.com>
To configure a mailing list to moderate messages that match any of the above criteria, you can modify the list's CONTENT_FILTER mail template, which you can access under "List Management > Customization > Mail Templates".
Add the following to the template:
References: <*> Action: MODERATE In-Reply-To: <*> Action: MODERATE Subject:: Re: * Action: MODERATE
These entries come in pairs. The first line indicates which header the filter applies to and what you're looking for in that header. For instance, References: <*> means that you are looking for messages with a "References" header that contains a less-than sign, followed by any amount of text and a greater-than sign. The following line determines what to do with messages that satisfy that criterion. In these cases, the messages should be moderated.
You may notice that the Subject:: Re: * criterion has two colons after "Subject". That is because it is intended to find an exact match. If only one colon were used, then LISTSERV would look for any message with a subject line that contains "Re:", so a message about the David Lynch film "Fire: Walk With Me" might be caught up since "Fire:" includes "re:". The double colon notation tells LISTSERV that you are only looking for messages that start with "Re:".
You would use a similar but slightly different set of CONTENT_FILTER entries if you wanted replies to go through without moderation and all other messages to be moderated.
References: <*> Action: ALLOW In-Reply-To: <*> Action: ALLOW Subject:: Re: * Action: ALLOW From: * Action: MODERATE
In this case, you're taking advantage of the fact that these rules are evaluated sequentially starting from the top, and once one of the rules is matched, LISTSERV ignores any later rules. The result is that any message containing a "References" or "In-Reply-To" header or has a subject line that begins with "Re:", is allowed through without moderation. But if a message makes it through those criteria without matching any of them, LISTSERV then checks to see if it has a "From" address (which all messages do) and sends the message to moderation.
I should once again note that these rules may not always correctly determine whether a message is a reply or not. For instance, someone could create an original message and manually type "Re:" in the subject line to get it flagged as a reply, or they could create a new message and write a reply to someone else's message to avoid it getting flagged as a reply.
References
Additional information about the CONTENT_FILTER feature can be found in section 8.3.3.7 of the LISTSERV Site Manager's Manual: http://www.lsoft.com/manuals »
Subscribe to LISTSERV at Work.
|