procmail
[Top] [All Lists]

Re: Allowing users to block email addresses??

2002-04-05 09:57:10

I would like to allow students to be able to block any mail from coming
into their own 
account.  So if Sally no longer want to receive mail
from  acompany.com she can block it from 
reaching her account but
Johnny can  still receive it in his account.  Since no accounts 
have
shell access, this  would have to be done through a web form.

So what Sally blocks 
won't block Johnny, right?  Because Sally may decide to block AOL.com and 
Hotmail.com :-
)

My questions are:

   Is this possible?

Almost anything is possible, it comes 
down to time and money and how satisfied you are with the limitations of the 
result. :-)

   
Has anyone done this successfully?

That I cannot say, although I would be surprised if 
you were the first.

   Can someone please point me in the right direction or even share
   
some sample code?

The easiest (theoretical, untested) way to do this would be to have two 
plain text files in each user's $HOME, say $HOME/.procmail.blocked.domains and 
$HOME/.procmail.blocked.senders

Your web form would ask if the new entry was a single 
sender or an entire domain, and then append the info to the appropriate file.

You should 
be easily able to find procmail code/recipes that will do this for you, 
searching the 
archives for fgrep and whitelist/blacklist should help.



   Would this cause any 
performance degradation on the system?

Sorry, I'm feeling a little extra playful 
today, so I have to say this...

Everything, even 'cat', causes a performance 
degradation.  Whether that is noticable or cause for concern has much to do 
with the specifics 
of the situation.

Would appending one name to a file degrade performance?  Not likely, 
no.

Would having a user who has 5,892,274 domain names in their blocked file cause 
a 
problem?  It might, especially if it exceeds LINEBUF.

For "normal" operations, I would 
not expect a degradation of performance

TjL

ps -- Someone will undoubtably post an URL 
to the site that describes why procmail really isn't the best tool for spam 
fighting, to which 
I agree.  Strict punishment (i.e. burning off the fingertips of anyone who 
spams or causes 
spam to happen) might be the only way, but most of society isn't quite there 
yet ;-)


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>