[Mimedefang] Blacklist_to or spam trap?

Jim McCullars jim at info.uah.edu
Wed Jan 15 15:56:01 EST 2003


On Wed, 15 Jan 2003, Stefano McGhee wrote:

> try it out.  I'd be interested if anyone has come up with a better
> solution, but your solution seems quite straightforward and easy to
> implement.  Thanks you very much for your suggestion.

   Putting this check in as part of SpamAssassin means the whole message
has to be read and processed because of a bad recipient.  I would think a
better place to check for this would be in filter_recipient, so that you
can reject it earlier in the session.  This is untested, but it should do
what you want:

@FormerEmployees = qw(user1 user2 user3 user4 user5 user6 user7 user8);
filter_recipient {
  my ($recipient, $sender, $ip, $hostname, $first, $helo) = @_;
  foreach $baduser (@FormerEmployees) {
    if ($recipient =~ /^$baduser\@/) {
      return (0, "Invalid recipient in envelope")
    }
  }
}

HTH...

Jim
*-------------------------------------------------------------------------*
* James H. McCullars                 I Phone: (256) 824-2610              *
* Director of Systems & Operations   I Fax:   (256) 824-6643              *
* Computer & Network Services        I Internet: mccullj at email.uah.edu    *
* The University of Alabama          I -----------------------------------*
*    in Huntsville                   I                                    *
* Huntsville, AL 35899               I This space for rent - CHEAP!       *
*-------------------------------------------------------------------------*




More information about the MIMEDefang mailing list