[Mimedefang] quarantined message forwarded
Bill Friedman
linguafr at sbcglobal.net
Sun Aug 10 15:08:01 EDT 2003
messages are getting quarantined, but copies are still being
forwarded to recipients via exchange server. I just want them
quarantined, but, not forwarded.
Aug 10 06:39:38 wendy sendmail[13964]: h7ADdaLw013964:
from=<jkchf2yv1l8 at rb27ex.com>, size=11645, class=0, nrcpts=1,
msgid=<1060522457.3472 at 119.rb27ex.com>, proto=SMTP, daemon=MTA,
relay=119.rb27ex.com [216.109.87.119]
Aug 10 06:39:38 wendy mimedefang.pl[6584]:
MDLOG,h7ADdaLw013964,spam,11.9,216.109.87.119,<jkchf2yv1l8 at rb27ex.com>,<andrew at mydomain.com>,Save
up to 70%! Check out these hot summer deals from uBid!
Aug 10 06:39:38 wendy sendmail[13966]: h7ADdcJB013966:
from=mimedefang at wendy.mydomain.com, size=2999, class=0, nrcpts=1,
msgid=<200308100639.h7ADdaLw013964 at wendy>, relay=defang at localhost
Aug 10 06:39:39 wendy mimedefang.pl[6584]: filter: h7ADdaLw013964:
quarantine_entire_message=1
Aug 10 06:39:39 wendy sendmail[13964]: h7ADdaLw013964: Milter change:
header Content-Type: from text/html to multipart/mixed;
boundary="----------=_1060522778-6584-259"
Aug 10 06:39:39 wendy sendmail[13964]: h7ADdaLw013964: Milter change:
header MIME-Version: from 1.0 to 1.0
Aug 10 06:39:39 wendy sendmail[13964]: h7ADdaLw013964: Milter message:
body replaced
Aug 10 06:39:39 wendy sendmail[13964]: h7ADdaLw013964: Milter add:
header: X-Scanned-By: MIMEDefang 2.34
Aug 10 06:39:39 wendy sendmail[13968]: h7ADdaLw013964:
to=<andrew at mydomain.com>, delay=00:00:02, xdelay=00:00:00, mailer=esmtp,
pri=30427, relay=cartman.mydomain.com. [x.x.x.x], dsn=2.0.0, stat=Sent (OK)
.......mimedefang-filter
I assume I'll be adding this
return action_discard();
...somewhere in sub filter_end, but, I'm not certain where.
if ($Features{"SpamAssassin"}) {
if (-s "./INPUTMSG" < 100*1024) {
# Only scan messages smaller than 100kB. Larger messages
# are extremely unlikely to be spam, and SpamAssassin is
# dreadfully slow on very large messages.
my($hits, $req, $names, $report) = spam_assassin_check();
if ($hits >= $req) {
md_graphdefang_log('spam', $hits, $RelayAddr);
my($score);
$QuarantineSubject=$Subject;
action_quarantine_entire_message("$report\n$Sender\n at Recipients");
if ($hits < 40) {
$score = "*" x int($hits);
} else {
$score = "*" x 40;
}
# We add a header which looks like this:
# X-Spam-Score: 6.8 (******) NAME_OF_TEST,NAME_OF_TEST
# The number of asterisks in parens is the integer part
# of the spam score clamped to a maximum of 40.
# MUA filters can easily be written to trigger on a
# minimum number of asterisks...
action_change_header("X-Spam-Score", "$hits ($score)
$names");
# If you find the SA report useful, add it, I guess...
action_add_part($entity, "text/plain", "-suggest",
"$report\n",
"SpamAssassinReport.txt", "inline");
} else {
# Delete any existing X-Spam-Score header?
action_delete_header("X-Spam-Score");
}
}
send_quarantine_notifications();
}
More information about the MIMEDefang
mailing list