Any sendmail guru's out there?

I’m trying to configure my QNX 4 sendmail (8.8.:sunglasses: system to
selectively reject spam.

What I’d like to do is have a database that has an ip address
to treatment mapping. Treatments would be one of:
ok allow email from this address
defer give a 454 Resource Unavailabile
kill give a 554 Spam denied
kind of thing.

So, I might have:
1.23.3.5 ok
12.44.55.66 defer
66.55.44.33 kill

(obviously, not real addresses :slight_smile:)

In an earlier incarnation of this, I figured on having an email
address in there as well, so that I could bounce on email
address too.

When I tried to do this, I added the following:

Kspammers hash /etc/spammers

Scheck_mail

check for valid domain name

R$* $: <?> $>3 $1
R<?> $* < @ $+ . > $:
R<?> $* < @ $+ > $#error $: 454 Domain must resolve

check relay against spammers database

R$* $: $(spammers $&{client_addr} $: OK $)
ROK $@ OK
R$+ $#error $: “454 Mail from known open relay or spam source denied (A)”
R$* $: $(spammers $&{client_name} $: OK $)
ROK $@ OK
R$+ $#error $: “454 Mail from known open relay or spam source denied (N)”

What I had hoped to accomplish here is if the “client_name” matched something
in the database, it would reject that too – that way I could selectively
reject not just on IP address, but on name as well.
Turns out, that it only matches the “client_addr” part.
This has bogged down my further attempts to add the selective treatments…

Any suggestions? I’ve tried to read the big honkin’ sendmail book by
O’reilly, but I just don’t have the brainpower to parse that :slight_smile:

Cheers,
-RK


Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at www.parse.com.
Email my initials at parse dot com.