[Mimedefang] action_tempfail question -- greylist at filter_begin

David F. Skoll dfs at roaringpenguin.com
Wed Feb 4 16:41:47 EST 2004


On Wed, 4 Feb 2004, Xiaoyan Ma wrote:

> Thanks again. Although I have not found a solution yet, I have learned more
> about MD with everyone's help.

This is pseudocode that shows how CanIt does it if you defer greylisting:

sub filter_begin () {
   my $recip;
   my $tempfail = 0;

   foreach $recip (@Recipients) {
      if (should_greylist($Sender, $recip, $RelayAddr)) {
         $tempfail = 1;
         # Note:  We do NOT break out of the loop here!
      }
   }

   if ($tempfail) {
	return action_tempfail("First-time sender tempfailed as anti-spam measure; please try again.");
   }
}

As others wrote, it's important to check *all* the recipients each time,
otherwise you end up greylisting many times over for a mail with lots of
recipients.

Regards,

David.



More information about the MIMEDefang mailing list