NODE 9467adedRe: help/subscribe
peb@PROCASE.COM (Paul Baclace)Tue, 26 Oct 93 15:12:38 PDT
>It seems I perpetrated a vile and offensive error in sending a subscribe
>request directly to the list.
I don't get offended, I just save the subscribe/unsubscribe message
in a special folder that I will use to train a learning algorithm
to recognize these kinds of requests. Then, I will create a program
that detects these so that mailing lists everywhere can automatically
bounce messages back to the sender with specific message like "please
send un/subscribe messages to fubar-request@node.com".
In other words, thanks for your example.
Anyone who sends me examples will benefit this project. (But don't send
examples from cypherpunks--I already get them.)
If anyone has suggestions for implementation that maximizes applicability
(e.g., I could write a C program that reads stdin or a named file and
returns a status code), please let me know.
Paul E. Baclace
peb@procase.com
NODE d1d30cdfRe: help/subscribe
Martin Janzen <janzen@idacom.hp.com>Wed, 27 Oct 93 17:18:02 PDT
Paul Baclace writes:
>>It seems I perpetrated a vile and offensive error in sending a subscribe
>>request directly to the list.
>
>I don't get offended, I just save the subscribe/unsubscribe message
>in a special folder that I will use to train a learning algorithm
>to recognize these kinds of requests. [...]
>If anyone has suggestions for implementation that maximizes applicability
>(e.g., I could write a C program that reads stdin or a named file and
>returns a status code), please let me know.
Since you mention stdin, I assume you're running UNIX. In that case, it's
very easy to do this using awk; no C programming required.
To try this out, create a small awk program called subscribe.awk, which
contains one regular expression per "flavor" of subscribe request. The
command in braces is executed if a match for that regexp is found:
/[Pp]lease subscribe me/ {exit 1}
/[Aa]d me to the/ {exit 1}
/How .* subscribe/ {exit 1}
[etc.]
Create or capture a suitable example message. To test it:
% awk -f subscribe.awk subscribe_message; echo $status
1
% awk -f subscribe.awk other_message; echo $status
0
Or, you can use awk as a filter:
% cat subscribe_message | awk -f subscribe.awk ; echo $status
1
% cat other_message | awk -f subscribe.awk ; echo $status
0
Now, just wrap it in a shell script which responds with an appropriate
message (you can of course have subscribe.awk return a different exit
code depending on which regular expression is matched), and call the
shell script from your $HOME/.forward file, mail filter, or whatever.
--
Martin Janzen janzen@idacom.hp.com
NODE 2344b084Re: help/subscribe
J. Michael Diehl <mdiehl@triton.unm.edu>Wed, 27 Oct 93 18:32:41 PDT
According to Martin Janzen:
>
> Since you mention stdin, I assume you're running UNIX. In that case, it's
> very easy to do this using awk; no C programming required.
>
>
> Now, just wrap it in a shell script which responds with an appropriate
> message (you can of course have subscribe.awk return a different exit
> code depending on which regular expression is matched), and call the
> shell script from your $HOME/.forward file, mail filter, or whatever.
Gak! Use procmail! I'm working on such a beast now. You can use regular
expressions and it gets executed when you get the email. Even better, you
never have to see the incoming message if you don't want to.
my $.02
J. Michael Diehl ;^) |*The 2nd Amendment is there in case the
mdiehl@triton.unm.edu | Government forgets about the 1st! <RL>
Mike.Diehl@f29.n301.z1 |*God is a good Physicist, and an even
.fidonet.org | better Mathematician. <Me>
al945@cwns9.ins.cwru.edu|*I'm just looking for the opportunity to
(505) 299-2282 (voice) | be Politically Incorrect! <Me>
Can we impeach him yet? |*Protected by 18 USC 2511 and 18 USC 2703.