[Mimedefang] Question for the HOWTO page
Les Mikesell
les at futuresource.com
Sun Jan 29 23:04:07 EST 2006
On Sun, 2006-01-29 at 14:30, Philip Prindeville wrote:
> Les Mikesell wrote:
>
> >I reject values that can only be reached by my local settings
> >for viagra/porn, and send the rest through with the score
> >value arranged for easy individual filtering (the asterisk list
> >as the first thing in the header).
> >
>
> Can you post your configs and diffs?
I don't think anyone would want to duplicate it exactly, but
sa-mimedefang.cf has things like:
whitelist_from *.microsoft.com
and
score ADULT_SITE 100
score SUBJ_VIAGRA 100
and mimedefang-filter has
sub filter_end ($) {
my($entity) = @_;
return if message_rejected();
# Spam checks if SpamAssassin is installed
if ($Features{"SpamAssassin"} && !relayIsTrusted($RelayAddr)) {
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();
my($score);
if ($hits < 40) {
$score = "*" x int($hits);
} else {
$score = "*" x 40;
}
## drop if SA score over 100
if ($hits > 100) {
md_graphdefang_log('spam', $hits, $RelayAddr);
md_syslog('warning', "Discarding because of spam score
hits");
action_bounce("Message screened as spam, please
rephrase");
return action_discard();
}
if ($hits >= $req) {
action_change_header("X-Spam-Score", "$hits ($score)
$names");
### note local header here with *'s only
action_change_header("X-FS-Spam-Score", "$score");
md_graphdefang_log('spam', $hits, $RelayAddr);
action_add_part($entity, "text/plain", "-suggest",
"$report\nX-FS-Spam-Score: $score",
"SpamAssassinReport.txt", "inline");
} else {
# Delete any existing X-Spam-Score header?
action_delete_header("X-Spam-Score");
}
}
}
The relyIsTrusted subroutine was posted by someone a long time ago and
contains a list of local addresses where the spam scan can be skipped.
--
Les Mikesell
les at futuresource.com
-------------- next part --------------
This mail is probably spam. The original message has been attached
along with this report, so you can recognize or block similar unwanted
mail in future. See http://spamassassin.org/tag/ for more details.
Content preview: On Sun, 2006-01-29 at 14:30, Philip Prindeville wrote:
> Les Mikesell wrote: > > >I reject values that can only be reached by
my local settings > >for viagra/porn, and send the rest through with
the score > >value arranged for easy individual filtering (the asterisk
list > >as the first thing in the header). > > > > Can you post your
configs and diffs? [...]
Content analysis details: (94.60 points, 5 required)
IN_REP_TO (-0.5 points) Has a In-Reply-To header
REFERENCES (-0.5 points) Has a valid-looking References header
EMAIL_ATTRIBUTION (-0.5 points) BODY: Contains what looks like an email attribution
ADULT_SITE (100.0 points)BODY: Possible porn - Adult Web Sites
QUOTED_EMAIL_TEXT (-0.5 points) BODY: Contains what looks like a quoted email text
REPLY_WITH_QUOTES (-0.5 points) Reply with quoted text
USER_AGENT_XIMIAN (-2.9 points) Headers indicate a non-spam MUA (Ximian)
X-FS-Spam-Score: ****************************************
More information about the MIMEDefang
mailing list