I'm am running Spamassassin v3.3.1 on CentOS.

I'm trying to find a way of writing the "From" header (the from address) for emails which have been identified as spam to an external file.

The idea being that I want to create a blacklist of addresses based on this content.

Is there a way of doing this?

1 Answer 1


Your mail server should log the message rejection along with the source IP address. You can mine this data to build your blacklist.

The Mail::SpamAssassin::Plugin::AWL plugin records spam scores in a database. If you set the mask bits to record the full IP address, you can extract the IP addresses for generating a blacklist.

You may want to combine this with a whitelist so you don't blacklist servers from major free-mail sites.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .