[Pardon me; I sent this reply yesterday but it only went to Sam, who
didn't think much of it.]
Jason Haar <[EMAIL PROTECTED]> writes:
> On Mon, Mar 08, 1999 at 10:49:00PM +0000, Sam wrote:
> > How would you propose to handle the second and subsequent E-mail
> > messages that the sender might send, after the first one is
> > accepted by Qmail?
>
> Well that about sorts that problem out.
>
> I can't see how I can do what I want without patching qmail itself.
As Dan would say, "This is UNIX. Stop acting so helpless."
There are a handful of ways to do the above without patching
qmail. Remember that qmail-smtp reads stdin and writes stdout. In
short, it is a filter. Hence, for example, an expect wrapper along the
following lines would work:
#!/usr/bin/expect --
proc maybe_kill {addr} {
# Check $addr; if bogus, kill as follows:
send "QUIT\n"
send_user "550 Go away! You smell like spam."
}
spawn qmail-smtpd
interact {
-re "mail from:<(.*)>\r" maybe_kill $interact_out(1,string)
}
A similar skeleton can implement tarpitting, helo-host verification,
or almost anything.
Len.
--
46. Take all Admonitions thankfully in what Time or Place Soever given
but afterwards not being culpable take a Time & Place convenient to let
him him know it that gave them.
-- George Washington, "Rules of Civility & Decent Behaviour"