[Mimedefang] stream_by_recipient takes too long

Murat Isik muratisik at megatek.com.tr
Wed Mar 24 06:51:01 EST 2004


Hello,

I am running MD 2.39 on Fedora Core 1. I have been palying around with
stream_by_recipient in order to be able to assign different mail users
different priviliges. So far, technically, it works fine. First it does
virus check. Then if a mail with an attachment to be filtered is sent to a
priviliged user and cc ed to an unpriviled user, the first one gets the
attachment and the second doesnot. So far so good. However there is one
problem . Even in local delivery it takes around an hour for the both users
to get these mails. Here is my code I use:

somewhere before filter_begin:

sub canonicalize_email ($) {
my($email) = @_;
$email =~ s/^<//;
$email =~ s/>$//;
$email = lc($email);
return $email;
}


at the very end of filter_begin:

return if (stream_by_recipient());


in filter after virus checking part:

if (canonicalize_email($Recipients[0]) eq 'priviliged at doman.com') {
return;
}


Here is what the maillog says when I send mail with attachment to both
users:



Mar 24 11:33:27 alpha sendmail[30040]: i2O9XRJM030040:
from=<test at domain.com>, size=10564, class=0, nrcpts=2,
msgid=<014a01c41183$d7078a00$b4704ad5 at murathq>, proto=SMTP, daemon=MTA,
relay=[213.74.112.180]
Mar 24 11:33:28 alpha sendmail[30044]: i2O9XSum030044:
Authentication-Warning: alpha.domain.com: defang set sender to
<muratisik at megatek.com.tr> using -f
Mar 24 11:33:28 alpha sendmail[30044]: i2O9XSum030044:
from=<test at domain.com>, size=10723, class=0, nrcpts=1,
msgid=<014a01c41183$d7078a00$b4704ad5 at murathq>, relay=defang at localhost
Mar 24 11:33:28 alpha sendmail[30044]: i2O9XSum030044:
to=<priviliged at domain.com>, delay=00:00:00, mailer=esmtp, pri=40723,
dsn=4.4.3, stat=queued
Mar 24 11:33:29 alpha sendmail[30046]: i2O9XT23030046:
Authentication-Warning: alpha.domain.com: defang set sender to
<muratisik at megatek.com.tr> using -f
Mar 24 11:33:29 alpha sendmail[30046]: i2O9XT23030046:
from=<test at domain.com>, size=10723, class=0, nrcpts=1,
msgid=<014a01c41183$d7078a00$b4704ad5 at murathq>, relay=defang at localhost
Mar 24 11:33:29 alpha sendmail[30046]: i2O9XT23030046:
to=<unpriviliged at domain.com>, delay=00:00:00, mailer=esmtp, pri=40723,
dsn=4.4.3, stat=queued
Mar 24 11:33:30 alpha mimedefang.pl[30018]: i2O9XRJM030040: streamed by
domain or recipient and resent.
Mar 24 11:33:30 alpha mimedefang[6079]: i2O9XRJM030040: Discarding because
filter instructed us to
Mar 24 11:33:30 alpha sendmail[30040]: i2O9XRJM030040: Milter: data, discard
Mar 24 11:33:30 alpha sendmail[30040]: i2O9XRJM030040: discarded


At first I thought the mail got discarded somehow but about an hour later I
got both of the mails into my testing outlook. During that time sendmail
queue was empty so the mails got stuck somewhere else I guess.

Any ideas?



More information about the MIMEDefang mailing list