HomePage » Mail » Spam

Spam


Spamassassin configuration file

A nice site to generate spamassassin config http://www.yrex.com/spam/spamconfig.php

Installation
rpmbuild --define "srcext .bz2" -tb Mail-SpamAssassin-3.1.9.tar.bz2
cd /usr/src/redhat/RPMS/i386
rpm -Uvh perl-Mail-SpamAssassin-3.1.9-1.i386.rpm spamassassin-3.1.9-1.i386.rpm


Install spamd to run with daemontools
useradd -s /bin/nologin spamd
useradd -s /bin/nologin spamd_logger
# run
#!/bin/sh

exec 2>&1
exec envuidgid spamd /usr/bin/spamd -s stderr -c -u spamd \
--socketpath=/tmp/.spamd.sock -m 10 -H -l -x \
--virtual-config-dir=/home/vmail/.spamassassin/%d/%l

# log/run
#!/bin/sh

exec /usr/local/bin/setuidgid spamd_logger /usr/local/bin/multilog t s9999 n10 ./main


Add the following to crontab to update spamassin
sa-update --nogpg --channel updates.spamassassin.org --channel saupdates.openprotect.com >/dev/null 2>&1 && service spamd restart



DKIM proxy

http://dkimproxy.sourceforge.net/

Installing dkimproxy on FreeBSD
Install it from ports.

Generate keys
openssl genrsa -out dkim.key 1024
openssl rsa -in dkim.key -pubout -out dkim.pub


Create dkim DNS record
Remove the PEM header in dkim.pub, then join all lines into one. Pick a selector name, and add this record:
securemail1._domainkey IN TXT "k=rsa; t=s; p=MIGf...AQAB"

Verify the record with the host command host -ttxt securemail1._domainkey.mydomain.com

Starting dkimproxy
Use this rc script as the one that comes with dkimproxy does not freaking read the config files.

#!/bin/sh
# Default-Start:  3 4 5
# Default-Stop:   0 1 2 6
# Description:    Runs dkimproxy

case "$1" in
start)
/usr/local/bin/dkimproxy.out \
--user=dkim \
--group=dkim \
--pidfile=/var/run/dkimproxy.pid \
--daemonize \
--keyfile=/usr/local/etc/dkimproxy-private.pem  \
--selector=default \
--domain=local.bankofamerica.com \
--method=relaxed \
127.0.0.1:10027 127.0.0.1:10028 >> /var/log/maillog
;;

stop)
kill -9 `cat /var/run/dkimproxy.pid` && rm -f /var/run/dkimproxy.pid
;;

esac


Postfix integration
Edit master.cf and reload postfix.
smtp      inet  n       -       n       -       -       smtpd
	-o content_filter=dksign:[127.0.0.1]:10027

submission  inet  n     -       n       -       -       smtpd
	-o smtpd_etrn_restrictions=reject
	-o content_filter=dksign:[127.0.0.1]:10027
dksign    unix  -       -       n       -       10      smtp
	-o smtp_send_xforward_command=yes
	-o smtp_discard_ehlo_keywords=8bitmime,starttls
127.0.0.1:10028 inet  n  -      n       -       10      smtpd
	-o content_filter=
	-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
	-o smtpd_helo_restrictions=
	-o smtpd_client_restrictions=
	-o smtpd_sender_restrictions=
	-o smtpd_recipient_restrictions=permit_mynetworks,reject
	-o mynetworks=127.0.0.0/8
	-o smtpd_authorized_xforward_hosts=127.0.0.0/8
pickup    fifo  n       -       n       60      1       pickup
		-o content_filter=dksign:[127.0.0.1]:10027


smtp handles local smtp connection. pickup handles mail delivered by calling /usr/sbin/sendmail directly.

Comments [Hide comments/form]
XMLYQb <a href="http://kuocxhbvwtzm.com/&
-- 109.230.216.203 (2012-01-22 15:14:58)
imdydadd, <a href="http://midwestofficials
-- 109.230.216.203 (2012-01-30 09:07:50)
qcwyikah, <a href="http://princesstulip.co
-- 109.230.216.203 (2012-01-30 13:09:54)
mcqoffqs, <a href="http://ienvyyou.net&quo
-- 109.230.216.203 (2012-01-30 17:11:51)
nqsgxeow, <a href="http://midwestofficials
-- 109.230.216.203 (2012-01-30 21:13:44)
qcpniciz, <a href="http://ichitect.net&quo
-- 109.230.216.203 (2012-01-31 01:23:29)
rchhzuod, <a href="http://24brownstreet.co
-- 188.143.232.210 (2012-02-05 17:09:41)
syefvbbn, <a href="http://star-image.net&q
-- 188.143.232.210 (2012-02-05 23:03:29)
viladmeg, <a href="http://star-image.net&q
-- 188.143.232.210 (2012-02-06 04:54:39)
xpcjxwsk, <a href="http://mo-par.com"
-- 188.143.232.210 (2012-02-06 10:55:11)
ejpopunm, <a href="http://thefanseye.com&q
-- 188.143.232.210 (2012-02-07 07:48:01)
rpyoreqw, <a href="http://24brownstreet.co
-- 188.143.232.210 (2012-02-07 14:16:24)
cyemnslg, <a href="http://zevdec.com"
-- 188.143.232.210 (2012-02-07 20:46:50)
uesuwmcl, <a href="http://rensink.org"
-- 188.143.232.210 (2012-02-09 12:11:39)
ugvfasad, <a href="http://extratouchautosa
-- 188.143.232.210 (2012-02-09 17:55:58)
lysvtbmw, <a href="http://extratouchautosa
-- 188.143.232.210 (2012-02-09 23:50:44)
etwhfgqr, <a href="http://britainfinest.co
-- 188.143.232.210 (2012-02-19 18:57:10)
jqvkbjcn, <a href="http://extratouchautosa
-- 188.143.232.210 (2012-02-20 02:08:43)
fplfrfpf, <a href="http://factormoda.com&q
-- 188.143.232.210 (2012-02-20 20:56:23)
jsdmtzcd, <a href="http://carrometal.com&q
-- 188.143.232.210 (2012-02-22 11:11:20)
egpojdnu, <a href="http://carrometal.com&q
-- 188.143.232.210 (2012-02-23 13:26:42)
sclqnwta, <a href="http://carrometal.com&q
-- 188.143.232.210 (2012-02-26 08:40:41)
fpmtofsn, <a href="http://hererjeg.com/&qu
-- 188.143.232.210 (2012-02-28 20:01:11)
iwbxkyjg, <a href="http://genesfurniturelo
-- 188.143.232.210 (2012-02-29 02:43:41)
maofasxh, <a href="http://muskokagetaways.
-- 188.143.232.210 (2012-03-03 11:56:24)
ukmamkbf, <a href="http://muskokagetaways.
-- 188.143.232.210 (2012-03-06 13:08:17)
kjrvfbrw, <a href="http://maritimebordeaux
-- 188.143.232.210 (2012-03-11 19:46:56)
qvdhddaf, <a href="http://ashadeabovethere
-- 188.143.232.210 (2012-03-12 02:35:08)
mstfqxiv, <a href="http://maritimebordeaux
-- 188.143.232.210 (2012-03-12 09:47:03)
xczwaokq, <a href="http://iron-goddess.com
-- 188.143.232.210 (2012-03-25 16:10:37)
fblknmjb, <a href="http://maritimebordeaux
-- 188.143.232.210 (2012-04-08 18:11:30)
aiumzgus, <a href="http://successlabinc.co
-- 188.143.232.210 (2012-04-09 00:10:18)
lbsrcgyd, <a href="http://reedwmapes.com&q
-- 188.143.232.210 (2012-04-10 08:36:58)
krzjpvwt, <a href="http://ajrasesores.com&
-- 188.143.232.210 (2012-04-10 15:06:28)
cxhoepcq, <a href="http://le-quizz.com&quo
-- 188.143.232.210 (2012-04-17 18:50:57)
crcawpgd, <a href="http://le-quizz.com&quo
-- 188.143.232.210 (2012-04-18 00:48:29)
kucmdigu, <a href="http://grahamdavey.com&
-- 188.143.232.210 (2012-05-04 06:52:10)
qsvdyctk, <a href="http://10-2-midnight.co
-- 188.143.232.210 (2012-05-04 13:19:06)
ctzrfrmi, <a href="http://burnsqh.com"
-- 188.143.232.210 (2012-05-16 08:53:03)
ojmmaueg, <a href="http://burnsqh.com"
-- 188.143.232.210 (2012-05-16 15:00:41)
eyfxndfw, <a href="http://gsiestates.com&q
-- 188.143.232.210 (2012-05-16 20:46:03)
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki