On Tue, Feb 04, 2003 at 08:59:55PM -0800, Photocon wrote:
> Im wondering if theres a simple way to add those few spammers who use
> the same address to qmails 'badmailfrom' or 'blackholedsender' file.

Although what I am about to describe is not exactly what you were asking 
for, there is a similar goal, and you may find it helpful.  

Instead of trying to add an address to badmailfrom when it had appeared in
the pending queue multiple times, I wanted to simplify adding addresses that
did not accept mail (and therefore the TMDA challenges doublebounced).  I
asked on the list here, and Jason provided me with basically the following
code to go in my /etc/tmdarc:

import os
domain = os.environ.get('HOST') or "nohost"
sender = os.environ.get('SENDER') or "nosender"
verp = sender.replace('@','=')
BOUNCE_ENV_SENDER = '[EMAIL PROTECTED]' % (domain,verp)

This creates a VERP address for each message that TMDA sends out.

Then I added a bounce.standblue.net virtualdomain in qmail, and directed
all mail for it to be handled by ~cwright/.qmail-bounce-default, with
TMDA generated bounces being handled by ~cwright/.qmail-bounce-tmda-default .
Inside that .qmail file I have the following:

./Maildir/.Saved.Admin.TMDA-Bounce/
|echo $EXT4 | sed 's/=/@/' >> ~/Maildir/badmailfrom

Then, once every few days I look through my ~/Maildir/badmailfrom file, 
remove anything that shouldn't be there (plus any VERP addresses), and then
append the list to my /var/qmail/bin/badmailfrom file.  

One gotcha: any spam that has a VERP will cause the sed command to replace 
the wrong '=' character, since the first '=' will be from the spam's return 
path.  

Anyway, my goal was to create a method for easily adding spam addresses to
badmailfrom.  I would caution against any system that automatically adds
anything to badmailfrom, just be sure you look things over first.

Cory

--
Cory Wright
Stand Blue Technology
http://www.standblue.net/
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users

Reply via email to