procmail
[Top] [All Lists]

SOLUTION: Filtering Non-existant User Accounts

1998-09-04 13:56:21
All,

A few people wrote privately and asked me to share this solution
after getting it.  Before doing so, I would like to give a big
THANKS to Christopher Lindsey for pointing us/me in the right
direction!!  Also, I would like to apologize for being a little
misapropriate in my last public post, but it was really Ken
Starr's fault :)  I only wanted to feel loved :):):)

Here it is, for all who wanted to know:

In your site specific config.mc file with sendmail (using m4) add
the define:

define(`LUSER_RELAY',`local:blackhole')dnl

This will add to the sendmail.cf file a local config change  
(as Chris pointed out) and a new rule set:

-------------------------------------------------------------------
Kuser user -m -a<>
DLlocal:blackhole

where "local" is the mailer (using procmail of course) and blackhole
is an alias in /etc/aliases assigned to whatever you choose.

The new rule sets which the define macro adds (so you can check) is:

R< > $+               $: < $L . > $(user $1 $)        look up user
R< $* > $+ <> $*      $: < > $2 $3                    found; strip $L
R< $* . > $+          $: < $1 > $2                    strip extra dot

These are not added to my sendmail.cf file without the define()
macro above.
-------------------------------------------------------------------

Now, of course, with a useable alias, you can use procmail to
slice, dice, with all the recipes one might cook, like the
ones this list seems to thrive on.

For a quick fix (which I will change later); my blackhole
aliase in /etc/aliase is just:

blackhole          : "|/usr/local/bin/blackhole"

where /usr/local/bin/blackhole is a null program.  This
not-elegant hack is from a one year old spam blackhole config.

--------------------------------------------------------------
However, with procmail (as you all know) one can easily write
a rule set to let all valid users pass and blackhole all the
rest (or other cool anti-spam things).

Thanks again Chris.  Also thanks to everyone for the private
mails, both offering suggestions, encouragement  and asking 
for solutions.

This one is working for me 100% and if anyone needs any help,
please write privately.  

(i'm currenly unsubscribed to this list, because I subscribed only
for this particular issue, but might come back in a month or so.)

Sorry to digress folks from the normal recipe chatter.  But sometimes
spam just *****  me off, sorry to say.  Most of my mail is spam because
my domains have been around since 1993.

Good Luck,

Tim
 

-- 
   Tim Bass
   Principal Consulting Engineer
   Tel: (703) 222-4243
   Fax: (703) 222-7320
   EMail: bass(_at_)silkroad(_dot_)com
   http://www.silkroad.com/


<Prev in Thread] Current Thread [Next in Thread>
  • SOLUTION: Filtering Non-existant User Accounts, Tim Bass <=