[Mimedefang] Filter_relay, global variable help

Jim McCullars jim at info.uah.edu
Mon Nov 3 14:33:04 EST 2003

On Mon, 3 Nov 2003, Dan Tulovsky wrote:

> I tried defining a variable $IsLocal at the top of mimedefang-filter
> outside of all subs and then setting it inside filter_relay if the
> network is local.  I then check this variable in filter_end.  I am not,
> though getting the expected results.

   Hi Dan, welcome to MIMEDefang.  As you have discovered, the subroutines
in your rules file (mimedefang-filter) are not atomic; that is, one
message does not traverse the entire slave from top to bottom.  The way
the multiplexor works, for a given message, one slave can process the
filter_relay(), another the filter_sender(), another the
filter_recipient(), and yet another slave could do the rest (which will be
atomic).  So basically, anything you set in filter_relay(),
filter_sender(), or filter_recipient() will be valid only for that
subroutine.  Anything you set in filter_begin(), filter(),
filter_multipart(), or filter_end() will be available thereafter.

   So in short, do your relay check (using the global variable $RelayAddr)
in filter_begin() and you should be OK.



More information about the MIMEDefang mailing list