[Mimedefang] Performance concerns
Phil Eschallier
phil at BuxTech.Com
Thu May 15 10:35:01 EDT 2003
Folks;
I got some help from this list a bit back (one of many to need to be told to
use tmpfs on Solaris for /var/spool/MIMEDefang). Thank you!!
My larger MD + SA deployment has been running well. I recently enabled the
filter_sender / filter_recipient / filter_relay processing, and performance
has really been hit hard -- even if I just have filter functions returning
continue.
I replicated the production environment on a local server. I now have this
as the filter_sender() function on the test server:
# Filter by sender.
sub filter_sender {
my($sender, $hostip, $hostname, $helo) = @_;
my $snd = $sender;
$snd =~ s/^<(.*)>$/$1/;
$snd = lc($snd);
if ($snd =~/\@buxtech\.com$/
) {
md_syslog('info', "Sender: '$sender' ($snd): No more filtering");
return('ACCEPT_AND_NO_MORE_FILTERING', 'OK');
} else {
md_syslog('info', "Sender: '$sender' ($snd): Filtering continues");
return('CONTINUE', 'OK');
}
}
just for testing / logging purposes. Oh ... and my mimedefang-filter is
pretty much the generic one (from install).
What I've found is that for each message I send, filter_sender() is being
called twice (about 10 seconds apart). Sendmail is configured to queue all
mail to mimic the larger environment.
I looked thru some of the archives and searched on Google; I can't find this
discussed. It seems to me that my performance concerns could be helped by
only calling filter functions once.
Am I missing something obvious? Is this because sendmail is queuing then
processing messages? The log file states that the relay address is the same
for each duplicate run (my filter_relay() function also runs twice per
message, and simply logs info via md_syslog()) otherwise I suppose I could
skip the second check if the second relay address was local.
Thoughts? Pointers?
... Phil
More information about the MIMEDefang
mailing list