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.
-----------------------------------------------------------------------

Reply via email to