Cobra Forum

Plesk Panel => email => Topic started by: Administrator on Jan 02, 2023, 08:07 AM

Title: How to Install SpamAssassin with Postfix on Ubuntu
Post by: Administrator on Jan 02, 2023, 08:07 AM
Prerequisites

Deploy an Ubuntu cloud server instance at Vultr.

Install Postfix mail transfer agent.

Create a sudo user.

Verify the server has outbound port 25 open.


1. Install SpamAssassin

Connect to your server with SSH.

Install SpamAssassin.

$ sudo apt-get update

$ sudo apt-get install spamassassin spamc -y
Configure SpamAssassin
Assign the spamd user account to SpamAssassin and set the log and default home directories.

Edit the configuration settings.

$ sudo nano /etc/default/spamassassin
Find the line:

ENABLED=1
Uncomment it by removing # and change the value from 1 to 0.

ENABLED=0
Find the line:

OPTIONS="--create-prefs --max-children 5 --helper-home-dir"
Change it to include the SpamAssassin user account and log files directory.

OPTIONS="--create-prefs --max-children 5 --username spamd --helper-home-dir /home/spamd/ -s /home/spamd/spamd.log"
Find the line:

CRON=0
Change the value from 0 to 1.

CRON=1
Save and close the file.

Make a backup of the SpamAssassin local configuration file.

$ sudo mv /etc/spamassassin/local.cf  /etc/spamassassin/local.cf.bk