[Mimedefang] Patch to Add Spamd Support

Richard Laager rlaager at wiktel.com
Tue Jun 17 09:46:02 EDT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bill Maidment wrote:
> It looks to me like you just substitute spamd_ for spam_assassin_ in 
> your filter. I'm running it now and I've noticed some warning 
> messages 
> about spamd still running as root. I'm using RedHat 9.

Sorry, I guess I never thought to include this information. I kinda figured
it would be slightly off-topic. But, as it relates to the patch...

I'm running spamd with "-a -u defang" as options. That way, it uses the
auto-whitelist and runs as the same user as MIMEDefang. This is not
strictly required. I do it because I keep my auto-whitelist in
/var/lib/MIMEDefang which I have owned by the defang user. (I have
/var/spool/MIMEDefang mounted using tmpfs, so no permanent data like an
auto-whitelist can live there.) Also, I keep the bayes db files in
/var/lib/MIMEDefang.

I haven't done anything with spamd and SQL preferences, because I handle
all of that in my mimedefang-filter code. Also, keep in mind that the
spamd_ functions do not pass a user to spamd. After all, what user would be
appropriate to pass? The one running sendmail? The one running MIMEDefang?
The recipient of the message who might not be local? Again, this is just
stuff to keep in mind.

Here's a code snippet from my filter:

=====

my ($hits, $req, $tests, $report) = spamd_check();
if (!defined($hits)) {
	return action_tempfail();
}

# At this point, I do checking against each recipient's threshold and
handle appropriately.

=====

Keep in mind that $report will always be "". There is no reliable way to
get both the list of tests and the report from spamd. I chose the list of
tests to be more important.

Richard Laager

-----BEGIN PGP SIGNATURE-----
Version: 6.5.8ckt http://www.ipgpp.com/

iQA/AwUBPu8bjm31OrleHxvOEQKVfgCg+N/gMBEtzAG3qtjivSeZibAZrfYAnRj/
M6jxybgIkUAVouBssmGA08eF
=9mD6
-----END PGP SIGNATURE-----




More information about the MIMEDefang mailing list