On Sun, 28 Apr 1996, Jack Schnapper wrote:
> I run 2 small lists (both under majordomo). Recently my lists have been
> getting advertisements (usually fairly large messages - @13k) from
> non-members soliciting magazine subscriptions. These always (I am pretty
> sure) come from AOL addresses that are deleted after the messages are sent.
> My host site is POBOX and I don't have access to the server. Therefore, I
> don't believe that I can make the lists closed to postings by non-members.
Ok, folks...I said I'd do it...and it turned out to be easier than
expected. Unfortunately, it does require cooperation/help from the
site's root user. If this became popular enough, though, I'm sure it
could be integrated into Majordomo as a email maintainable thing.
I've never understood why filtering isn't done at the source...rather
than _my_ procmailrc catching the magazine spams, why not save everyone
the bandwidth and disk space, and trash it at the list server??
So...what I've done is throw procmail onto the frontend of a majordomo
list. This is only _very_lightly_tested_...so don't go off and do this
to all your lists and bitch at me when it blows up. :)
Here are the changes I made:
#test: "|/home/admin/majordom/tools/majordomo-1.93/wrapper \
#resend -l test -h kashmir.fdt.net -s test-outgoing"
test: "|IFS=' '&&exec /usr/local/bin/procmail -f- \
/etc/procmailrcs/testrc ||exit 75 #test"
This pipes incoming mail off to procmail and tells it to process it with
the rules in /etc/procmailrcs/testrc. /etc/procmailrcs/testrc is owned
by majordom...and according to the docs, this will cause procmail to suid
majordom when processing this rcfile.
The /etc/procmailrcs/testrc contains:
MAILDIR=$HOME/mail # You'd better make sure it exists
# DEFAULT was all one line...but doesn't fit in 75col email !
DEFAULT="/home/admin/majordom/tools/majordomo-1.93/wrapper resend -l test
-h kashmir.fdt.net -s test-outgoing"
#a test recipe to make sure it can "do the right thing"
#send the mail off to the real majordomo stuff
Now, all you should have to do is remove the test recipe, and add real
ones before the last one. You could even use INCLUDERC to keep seperate
filters for each list that include a generic one for common spams.
Is there some reason nobody did this before? Sure, you could still send
directly to test-outgoing...but there are ways of at least somewhat
hiding the outgoing list, and there's nothing to stop you from doing a
similar procmail filter there as well. This will catch most casual
spammers...or at least force them to learn more about email.