procmail
[Top] [All Lists]

Detecting Invalid User

1997-07-11 07:00:00
My company uses our ISP to "ghost" our domain, lsmp.com. All mail addressed
to username(_at_)lsmp(_dot_)com goes to 
lsmp(_at_)starbase(_dot_)neosoft(_dot_)com(_dot_) I use procmail to
forward messages to each user's mailbox at Neosoft.

The recipe below does not handle the case where a message is sent to both
valid_UserName(_at_)lsmp(_dot_)com and to 
invalid_UserName(_at_)lsmp(_dot_)com(_dot_)

How can I tell if ^TO that contains a valid user, _also_ contains an
invalid user?

#handle users(_at_)lsmp(_dot_)com
:0
* (^TO)(_dot_)*(_at_)lsmp(_dot_)com
  {
   :0 c
   * (^TO).*(able)@lsmp.com
   ! able(_at_)neosoft(_dot_)com

   :0 c
   * (^TO).*(baker)@lsmp.com
   ! baker(_at_)neosoft(_dot_)com

   :0 c
   * (^TO).*(charlene)@lsmp.com
   ! charlene(_at_)neosoft(_dot_)com

   #no valid user-> able(_at_)neosoft(_dot_)com
   #doesn't catch mail was sent to a valid user and an invalid user
   :0 c
   * !(^TO).*(able|baker|charlene)@lsmp.com
   ! able(_at_)neosoft(_dot_)com

   #the message is dealt with - trash it.
   :0
   /dev/null
  }

#trash everything else
:0
/dev/null

--
Steve Knouse(_at_)neosoft(_dot_)com              
<http://www.neosoft.com/~knouse>
Director, Data Processing         +1-713-796-0505; Fax +1-713-796-8631
Lone Star Medical Products, Inc.                <http://www.lsmp.com/>
8733 Knight Road, Houston, TX 77054 USA


<Prev in Thread] Current Thread [Next in Thread>
  • Detecting Invalid User, Steve Knouse <=