more spam bouncing

2001-06-19 Thread Mike Culbertson

After some thought, perhaps I shoud clarify what I am trying to do.  I have 
looked and looked, and seems most every feature for filtering relies on 
.qmail files, or something like procmail.  I would like to determine if there 
is a way to avoid both of these.  Since the machines in question with this 
problem are relays (private relays in case you are wondering), there are no 
home directories for me to add .qmail files to.  Also, since they don't hold 
mail locally, with procmail, the path would be:
sender  qmail  procmail  qmail  relay target host
which would signifigantly increase the load required to send each piece of 
mail on to it's destination.  I don't want to send every piece of mail 
through procmail (or similar) if I don't have to.

What would be great would be to have qmail-smtpd catch the HELO or MAIL FROM 
address the sender gives (a la badmailfrom) and do something, like perhaps 
dump the mail to a local account for further processing, or initiate a 
bounce, anything other than just an smtp reject.  This way, good mail would 
travel clean on through the relay without being subject to any additional 
filtering, and only  mail matching a bad domain would get handled further.  
This may be entirely out of the realm of capability within the parameters I 
have described, I'm not sure.   It just seems there must be some way to 
fanagle qmail itself into reacting to the sender domain.  If this answer is 
painfully obvious, feel free to slap me, but I'd rather know regardless :)

Mike Culbertson



Re: more spam bouncing

2001-06-19 Thread Charles Cazabon

Mike Culbertson [EMAIL PROTECTED] wrote:
 
 What would be great would be to have qmail-smtpd catch the HELO or MAIL FROM 
 address the sender gives (a la badmailfrom) and do something, like perhaps 
 dump the mail to a local account for further processing, or initiate a 
 bounce, anything other than just an smtp reject.

This is possible.  For the particular hosts/IP addresses you want to filter
mail from, have entries in your tcprules file like this:

1.2.3.4:allow,RELAYCLIENT=@mailfilter

Then, in virtualdomains, have an entry like:
mailfilter:alias-mailfilter

Then, have ~alias/.qmail-mailfilter-default which contains appropriate
instructions for what to do with these messages.  Note that they could be
addressed to any domain originally, and qmail-smtpd will append the contents
of RELAYCLIENT to the address they supply.  You can pipe all these messages
through a filter, or simply do:

| bouncesaying We don't really like your mail.  Phone 555-1234 to change our
minds.

Charles
-- 
---
Charles Cazabon[EMAIL PROTECTED]
GPL'ed software available at:  http://www.qcc.sk.ca/~charlesc/software/
Any opinions expressed are just that -- my opinions.
---