Download/view it here (v0.3) or changelog.
To install and use:
/usr/local/sbin
.
/etc/aliases file
to include this line:
spamassassin: |/usr/local/sbin/submit_spam
newaliases
nobody
user for security reasons. It's unlikely
that spamassassin is being run as this user, so instead we
define a transport to run the script as the appropriate user.
In this case, the amavis
user.
/etc/postfix/master.cf
to
define a new transport by adding these lines:
# spam submission submitspam unix - n n - 1 pipe flags= user=amavis argv=/usr/bin/perl -T /usr/local/sbin/submit_spam ${user}
/etc/postfix/transport
to use the new transport
for spam submissions by adding this line:
spamassassin@laidman.org submitspam:localhost
postmap /etc/postfix/transport
postfix restart
spamassassin@yourspamserver.com
.
To ensure this is working, run the following command before and after submission and compare the differences. It needs to be run as the user with the spamassassin database.
sa-learn --dump magic
Comments, submissions welcome: jeremy+mailtest@laidman.org