FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > Email & Mailing List Management
User Name
Password  Lost PW

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 08-01-2001, 03:53 AM   Postid: 50766
sheila
Site Owner
 
sheila's Avatar

Forum Notability:
0 pts: Even-handed
[Post Feedback]
 
Join Date: Aug 1999
Location: Metro Los Angeles Area
Posts: 7,398
filtering: Whitelists/Blacklists

OK, in this thread:
http://www.aota.net/forums/showthrea...&threadid=8798

There were some questions about Whitelist/Blacklist filtering.

Here are some simple examples using filtering.

Suppose this is your .qmail-default file in your /big/dom/xdomain directory:
Code:
|condredirect devnull@domain.com /usr/bin/env python /big/dom/xdomain/sircamscan.py
|condredirect secret@domain.com /usr/bin/env python /big/dom/xdomain/addresscheck.py to ./goodtolist.txt
|condredirect secret@domain.com /usr/bin/env python /big/dom/xdomain/addresscheck.py cc ./goodtolist.txt
|condredirect secret@domain.com /usr/bin/env python /big/dom/xdomain/addresscheck.py from ./goodfromlist.txt
|condredirect secret@domain.com /usr/bin/env python /big/dom/xdomain/domaincheck.py from ./gooddomains.txt
&nobody@spamcop.net
secret@domain.com is a private e-mail address that I share with NO ONE, not friends, family, NO ONE. I filter my mail and the filter decides wether to forward to that addy or not.

Here is what it does: the first line checks whether a copy of the SirCam virus has been sent. (I only got two copies today? It's going away, I think.) If the mail passes that test, it is redirected to a "black-hole" address. (See this post http://www.aota.net/forums/showthrea...0563#post50563 for more details.)

The next three lines check for addresses in a white list. They all run this script:

Code:
Corrected Code posted in next Post
ADMIN EDIT: Removing Proof That Sheila is Human by Sheila's Request
I call this script "addresscheck.py". This script takes two parameters:
A mail header field (To, CC or From) and the name of a whitelist file.

In the file goodtolist.txt I have a list of e-mail addresses, that if anyone sends an e-mail TO or CC to that address, I want to get that e-mail. So, lines 2 and 3 of the .qmail file are checking the To field and the CC field to see if those addresses are in my whitelist of "To" addresses.

The fourth line of my .qmail file is checking another file, called "goodfromlist.txt", which is a list of e-mail addresses, that if I receive anything FROM that e-mail address, then I want to get that e-mail.

The fifth line is checking a file called gooddomains.txt, which is a list of domains that I WANT to receive mail from. (I haven't posted the domaincheck.py script here, but if someone wants it, just send me a message.)

The sixth line forwards any mail that has not passed previous filters to a spamcop address.

You could reverse the principles here, and have blacklists of e-mail addys or domains, instead of whitelists, and use the same addresscheck.py script, only I'd assume you'd redirect them e-mail to a different address (like spamcop or a black hole? Or use the "bouncesaying" command to bounce the messages back?)

I don't know how "server friendly" it is to have up to five scripts execute per email received to the default mailbox for a domain. This is just an example, and one should probably be conservative with this type of thing.

Anyway, I hope these examples are useful to some of the people who asked about the Blacklist/Whitelist type of stuff.

Last edited by Bob : 08-22-2001 at 07:23 PM.
sheila is offline   Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 05:17 PM.


Running on vBulletin®
Copyright © 2000 - 2013, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2013 FutureQuest, Inc.
FutureQuest, Inc.