A brief description of how to patch spamd so it will run on VPS Scott Wiersdorf Wed Sep 25 12:59:27 MDT 2002 Thu Apr 8 13:46:59 MDT 2004 [Note: this information is deprecated; spamd now runs natively on VPS 1-style virtual servers and is available via a 'vinstall'. The information here is left for historical purposes only.] ======================================================= Patching spamd: There are actually at least two good ways to do this (the second way is to virtually link in syslogd and syslogd.conf into your VPS and run a virtual syslogd; this obsoletes the need for this patch. This is beyond the scope of this document). If you save this "hunk" between "" and "" (not including the "" lines) to a file called mypatch, you can just type: patch ~/usr/local/bin/spamd mypatch and spamd will be patched for you. --- spamd.orig Fri Jun 28 20:26:51 2002 +++ spamd Wed Sep 25 18:30:38 2002 @@ -622,6 +622,12 @@ sub logmsg { + open LOG, ">>$ENV{'HOME'}/var/log/messages" + or return; + print LOG "@_" . ( "@_" =~ /\n$/ ? '' : "\n" ); + close LOG; + return; + my $old = $SIG{'PIPE'}; $SIG{'PIPE'} = sub { $main::SIGPIPE_RECEIVED++; }; ======================================================= Running spamd (see 'man spamd' for details): This is the line you should put in ~/etc/rc (and the line you type when spamd is not running). Replace with your server's IP address (you can find your IP address by typing 'sinfo' at your shell prompt). If you want to have spamd filter for other servers on the Internet too, list them after yours, separated with commas. The -d tells spamd to daemonize; the -c tells spamd to automatically create ~/usr/home/joe/.spamassassin/user_prefs file (empty); The -p tells spamd to listen on port 1783 (by default it tries to bind on 783, which is currently restricted for VPS); the -A tells spamd to allow connections from this (these) IP(s). /usr/local/bin/virtual /usr/local/bin/spamd -d -c -p 1783 -A ======================================================= Filtering mail: This is the line you should put in ~/etc/procmailrc (or ~/usr/home/joe/.procmailrc if you formerly launched Spam Assassin per-user). The -p tells what port to connect to spamd on and the -s says reject messages larger than 100000 bytes (100k). You can adjust that value if you need to (see 'man spamc' for details). In ~/etc/procmailrc (or ~/usr/home/joe/.procmailrc) replace this: :0fw |/usr/local/bin/spamassassin -P with this: :0fw |/usr/local/bin/spamc -p 1783 -s 100000 =======================================================