You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Jorge Valdes <jv...@intercom.com.sv> on 2004/11/09 23:35:56 UTC
Patch to SPAMD
Hi all,
I recently made a new server install starting from scratch: fresh OS
install (RedHat 7.3), and after installing SpamAssassin 3.0.1, I have
the following issues with spamd:
1.- Since I like to run spamd under daemontools, I would like it for
spamd not to print out the timestamp each time it writes to the log
(this just makes for duplicate timestamps with multilog). I suggest a
command-line option (i.e. --syslog-nodate) to instruct spamd not to add
the timestamp when writting to the logfile.
2.- In the subroutine check(); there are a few things:
2.1.- The variable $yorn (Yes or No) is set depending on the
$status->is_spam(), but in the case where its not, a dot ('.') is
assinged, shouldn't this be a 'N'?
2.2.- Towards the end, when the information is being logged about the
message scan, there is a duplicate call to $status->get_score which
could be removed and save a few cpu cycles...
2.3.- As a matter or preference, the variable $msg_score is assigned the
message score with a one decimal precision, I like two decimals :-)
2.4.- Ditto for $scantime, since Time::HiRes is available with most perl
implementations (and easily available via CPAN) there is a lot of
precision lost with just one decimal for seconds :-)
3.- In the subroutine handle_user(); when enabling vpopmail, there are a
couple of issues when vpopmail is enabled:
3.1.- Basically, `~vpopmail/bin/vuserinfo -d` is used to get the user's
home directory, and no provision is made to check the result for an
error message, this just generates all sorts of errors in the logs. If
an error is detected, just return from handle_user with 0 and all the
errors disappear...
3.2.- Also, the directory is not created because the $dir variable does
not contain the correct directory to create, and neither the directory
or the user_prefs file are created. This is a simple fix.
If anyone is interested, attached is a patch file for these changes...
--
Jorge Valdes
Intercom El Salvador
jvaldes@intercom.com.sv
fax: ++(503) 265-7025