Spam

From Hackepedia
Revision as of 01:54, 14 February 2011 by Franks (talk | contribs)
Jump to navigationJump to search

BSD

On OpenBSD this should work out of the box. On FreeBSD you have to mount a fdescfs(5) filesystem in order to get this working. There is an effective way to block spam using pf and spamd (OpenBSD's version, not SpamAssassin's). These are taken directly from Bob Beck's slide presentation at BSDCAN 2005

in pf.conf (note variables):

table <spamd> persist
no rdr on { lo0, lo1 } from any to any
rdr inet proto tcp from <spamd> to any port smtp -> 127.0.0.1 port 8025
table <spamd-white> persist
rdr pass inet proto tcp from !<spamd-white> to any port smtp -> 127.0.0.1 port 8025
pass in log on $ext_if inet proto tcp to $Mail_servers port smtp keep state
pass out log on $ext_if inet proto tcp from $Mail_servers to any port smtp keep state

and add the cronjob:

*/30    *    *    *    *    /usr/local/sbin/spamd-setup

Also probably worth your time to check out your spamd.conf although it shouldn't require modification to work out of the box.

Now moving on to the Testing:Process.

Mediawiki

As this server was attacked by spambots, I'll let you know of some of the resolutions that worked. In LocalSettings.php after getting your ReCaptcha keys:

require_once( "$IP/extensions/ConfirmEdit/ConfirmEdit.php" );
require_once( "$IP/extensions/ConfirmEdit/ReCaptcha.php" );
$wgReCaptchaPublicKey = 'yourpublickeyhere';
$wgReCaptchaPrivateKey = 'yourprivatekeyhere';
$wgCaptchaClass = 'ReCaptcha';
# It should be noted that I was using SimpleCaptcha first, but the spam bots seems to have defeated the simple math. 

There is no automated way to ban users or delete posts, so you have to do that manually unfortunately.