On Fri, 11 Mar 2005, Andrew Bosch wrote:
>Have you tried calling a script from one of the Listserv exits?
>
>andrew
This is what I do on my list IBM-MAIN. I use the POST_FILTER exit. This
exit calls a script which saves a copy of the potential post to a
temporary file. The script then calls a C program to read in this
temporary file, analyze its contents, and exit with a specific return
code. For example:
Return codes:
0 = Post ok, allow
1 = Banned subject, reject
2 = Out of Office, reject
3 = Filtered bad mailer, reject
4 = Reserved "ADMINISTRIVIA" subject not from owner, reject
5 = Test message, reject
6 = Excessive quoting, reject
7 = Message from braindead mailer, reject
8 = Message from Non-Subscriber, reject
My list is configured with a BOTTOM_BANNER and a function within the C
program is to count the number of bottom banners. If the size of the
post (# lines) and # of bottom banners exceed some limit I define,
the program exits with a return code of 6. The script that called
the C program, examines the return code and takes the appropriate
action. In this case, it creates a file with that begins with the
text:
The enclosed message, sent to the IBM-MAIN discussion list, has been
rejected because it contains an excessive amount of quoted material from
previous posts. Please edit your reply so that it does not contain
an excessive amount of quoted material, including signatures, disclaimers,
and other non-relevant material. Send questions/comments to me and NOT the
IBM-MAIN discussion list.
Thank you for your cooperation.
Darren Evans-Young <[log in to unmask]>
IBM-MAIN List Owner
---------------------------- Message Rejected ----------------------------
...followed by the original message. The script directly emails this to
the posting user address and Listserv never posts the original item to the
list. This program and script does a lot more, like prepares posts for
sending to the newsgroup bit.listserv.ibm-main, but has worked flawlessly
for years. It is highly tailored for my environment. We run Solaris 9. If
you run Unix, I can help you set this up. I seem to remember it being a
pain to figure out. Knowledge of C and shell scripting required.
Darren Evans-Young,
IBM-MAIN List Owner (since 1986)
|