[Mimedefang] Order of the fuctions?
jscully at isupportisp.com
Mon Jun 20 12:00:52 EDT 2005
We handle this a little differently. Instead of relying on "the lowest
threshold" to determine how to han dle all recipients we pull the users
settings during the recipient check in filter_recipient, and write them to
our own file called RECIPIENT_SETTING in the working directory of the
message (this is very fast since we have the MD dir on ramdisk).
This includes exploding any multiple mailbox aliases into their individual
users and saving those settings.
In filter end, after scoring the message we loop through the
recipient_settings file and based on the relative score and the per-user
setting to mark, file or discard spam we use add_recipient and
delete_recipient to make the changes.
End result is that each user's message is handles based on their own
settings for threshold and disposition, without the additional overhead of
----- Original Message -----
From: "Matthew Schumacher" <matt.s at aptalaska.net>
To: <mimedefang at lists.roaringpenguin.com>
Sent: Friday, June 17, 2005 3:53 PM
Subject: Re: [Mimedefang] Order of the fuctions?
> Kelson wrote:
> > You're missing filter_relay, which comes before filter_sender and
> > filter_recipient.
> > Also it's important to remember that those three can run in entirely
> > separate MD slaves than each other or the filter_begin/filter/filter_end
> > trio. You can't have variables reliably persist from filter_sender to
> > filter_begin, for instance, because it might be another process handling
> > it.
> That is very important to know, I didn't realize that they could be
> called on different slaves.
> This creates a problem for me. I need a way to get SA threshold out of
> an LDAP directory and then use it instead of the default. Since there
> could be more than one recipient, I was going to loop though the
> recipients in filter_recipient and use the lowest score. Apparently
> this won't work because whatever var I set in filter_recipient may not
> be valid when I get to filter_end.
> So I guess I need a way to get a list of recipients in the filter_end
> function. I suppose I could get the list out of the headers but that
> won't catch bcc addresses and is generally a bit less accurate.
> Do you know of a way to access the rcpt to: addresses in filter_end?
> Thanks for your helpful response,
> Visit http://www.mimedefang.org and http://www.roaringpenguin.com
> MIMEDefang mailing list
> MIMEDefang at lists.roaringpenguin.com
More information about the MIMEDefang