Want less spam? Learn how to integrate Spamassassin with Postfix Mail Server



The duty of stopping the endless move of spam will get a bit less complicated with Spamassassin and Postfix.

The way to combine Spamassassin with Postfix Mail Server
The duty of stopping the endless move of spam will get a bit less complicated with Spamassassin and Postfix.

The Postfix Mail Server (a free, open-source mail switch agent that routes and delivers e mail) features a rudimentary content material checker. Nonetheless, given how prevalent SPAM has turn into, for a lot of companies that inbuilt test will not be sufficient. Due to this, you will most likely need to beef up Postfix with a third-party device. One such device is Apache’s Spamassassin.

Spamassassin makes use of quite a lot of spam-detection strategies, equivalent to DNS- and fuzzy-checksum-based spam detection, Bayesian filtering, exterior applications, blacklists, and on-line databases. That is significantly extra highly effective than the bare-bones test in Postfix. In the event you discover your organization getting an inordinate quantity of spam via Postfix, that server would possibly want a little bit of a lift, with the assistance of Spamassassin.

SEE: Home windows 10 safety: A information for enterprise leaders (Tech Professional Analysis)

So how do you combine the 2? Let’s discover out.


I’m going to imagine that you have already got a working Postfix SMTP server operating on Linux. I am going to show the set up and integration on the Ubuntu Server 18.04 platform. In case your server platform of selection is totally different, you will want to switch the set up directions accordingly.

Set up

Out of the field, Spamassassin is not put in. To treatment that, open a terminal window and difficulty the command:

sudo apt-get set up spamassassin spamc -y

As soon as the set up completes, the spamassassin daemon should be began and enabled (so it runs at boot). To do that, difficulty the next two instructions:

sudo systemctl begin spamassassin
sudo systemctl allow spamassassin

That is it for the set up. Time to combine.

Configuring Postfix

Postfix should be configured such that it’ll cross incoming e mail via Spamassassin. To do that, open the Postfix configuration file with the command:

sudo nano /and so on/postfix/grasp.cf

Close to the very high of that file (Determine A), you will discover a line beginning with smtp.


Determine A: The Postfix configuration file.

On the finish of that line, add the next:

-o content_filter=spamassassin

So your complete line ought to appear to be:

smtp      inet  n     -       y       -       -       smtpd    -o content_filter=spamassassin

Scroll to the underside of the grasp.cf file and add the next strains:

spamassassin unix -     n n - -       pipe
person=debian-spamd argv=/usr/bin/spamc -f -e
/usr/sbin/sendmail -oi -f $ $

Save and shut that file.

Restart Postfix with the command:

sudo systemctl restart postfix

Postfix and Spamassassin at the moment are working in conjunction, to assist stop spam.

Much less spammy e mail

Congratulations, you must now get pleasure from much less spammy e mail by way of Postfix. Your organization, and your shoppers will thanks. That is definitely not the tip of the road for the prevention of malicious incoming or outgoing mails in your server, nevertheless it’s a terrific (and fast) begin. 

Additionally see


Jack Wallen


Source link