Toggle navigation
TechnoWikis.com
Email or Username
Password
Remember
Login
Register
|
I forgot my password
All Activity
Questions
Hot!
Pending
Ask a Question
Privacy Policy
Contact
Installing and configuring SpamAssassin on a server
Home
Tutorials
Security
Installing and configuring SpamAssassin on a...
(adsbygoogle = window.adsbygoogle || []).push({});
+5
votes
227
views
Installing and configuring SpamAssassin on a server
asked
Jun 23, 2019
in
Security
by
backtothefuture
(
552k
points)
reopened
Jun 23, 2019
|
227
views
answer
Your answer
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
Add answer
Cancel
1
Answer
+3
votes
Best answer
Installing SpamAssasin
One of the most frequent problems is the indiscriminate use when sending and receiving spam by mail.
To solve this problem in a server we can install the SpamAssassin tool, which is a filter that uses heuristic algorithms to identify spam by consulting its database in real time analyzes the text of the email using basic rules, manages checks on headers and body of the email, assigning a score according to the probability that it is spam or unwanted email.
When it detects possible spam it can delete the mail, redirect it to a selected directory or add a warning label.
It is an interesting application if the server is used to provide hosting service.
It can be installed in any Linux distribution, this time we will see how to perform the installation for a server with Centos, but it is not difficult to adapt it to any distro.
In most of the distro comes the application in the repository but we can download it from http: //spamassassin......./index.html .
To begin we will access via ssh to our server and in the terminal window
We install perl (Perl minimum 5.8.8) and some dependencies to manage mail
yum install perl
yum install perl-Mail-DKIM.noarch
Then we installed the spamassasin
yum install spamassassin
When you have finished installing, we begin to configure it, create a user and a directory for the filters
useradd -d / home / spamfilter -s / bin / false spamfilter
chmod 766 / home / spamfilter
With the nano or vi editor we open the local.cf file to define the filter rules
nano /etc/mail/spamassassin/local.cf
For example, we can define
# Scoring to be marked spam
required_hits 5.0
# Text that will be placed before the subject of emails that are spam
rewrite_header Subject [***** SPAM *****]
# Encapsulate spam in an attachment to the warning email
report_safe 1
# Enable Bayes system
use_bayes 1
# Self-learning
bayes_auto_learn 1
bayes_path / home / spamfilter /
bayes_file_mode 0666
# Spam Checks
skip_rbl_checks 0
use_razor2 1
use_dcc 1
use_pyzor 1
Then we save the file with the name local.cf and leave the editor.
In the terminal we restart the service
service spamassassin restart
Spamassasin can be installed on all Cpanel, plesk, directdmin control panels.
Here we can see a version of the configuration we made in text mode from directadmin.
We can also see a similar system but for the cpanel control panel
Configuring the antispam system
To optimize the antispam program we can use the sa -learn command that will allow to define some parameters to train the software.
For example, from the command line we type
sa-learn --spam --mbox ~ / mail / spam
This will check spam from mbox-type accounts and send to the spam directory
sa-learn --ham --mbox / var / spool / mail / user
This means valid emails from mbox accounts sent to the user's account
All these configurations can be used by the administrator, by users with reseller accounts or by individual users, since once installed spamassasin can be managed from the control panel, creating the new filters that Spamassassin will train.
This program can also learn only using its heuristic algorithm and the rules that it adds to its database.
answered
Jun 23, 2019
by
stackoverflow
(
3.5m
points)
edited
Jun 23, 2019
ask related question
comment
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Add comment
Cancel
Related questions
+3
votes
1
answer
Configuring images in Windows Server 2012 - Part 1
asked
Jun 23, 2019
in
Windows Server
by
backtothefuture
(
552k
points)
|
233
views
+4
votes
1
answer
Configuring images in Windows Server 2012 - Part 2
asked
Jun 23, 2019
in
Windows Server
by
backtothefuture
(
552k
points)
|
217
views
+3
votes
1
answer
Debian - Compiling and installing a new Kernel
asked
Jun 24, 2019
in
Linux / Unix
by
backtothefuture
(
552k
points)
|
210
views
+4
votes
1
answer
Launch a game on your Android mobile without even installing it
asked
Jun 26, 2020
in
Android Tutorial
by
backtothefuture
(
552k
points)
|
253
views
+3
votes
1
answer
Installing DHCP in Windows Server 2008
asked
Jun 24, 2019
in
Windows Server
by
backtothefuture
(
552k
points)
|
216
views
Sponsored articles cost $40 per post. You can contact us via
Feedback
All categories
Tutorials
7.5k
Microsoft
1.9k
Android
1.4k
Security
120
Linux / Unix
543
Internet
757
Virtualization
104
Apple
611
Networks
64
Other Devices
321
Other Applications
184
Hardware
19
Development
53
Digital Marketing
47
Databases
14
Graphic Design
30
Guides
794
GraphicDesign
54
Networking
4
PlayStation
186
Gaming
55
Linux/Unix
85
Manzana
33
Otherdevices
38
Otherapps
49
Digitalmarketing
39
Safety
1
Developing
2
Help
685
Social Networks
34
Android Tutorial
549
iPhone Tutorial
267
News
17
Social
6
Phone
11
Telephone
9
Applications
167
Smartphones
3
Cell Phones
11
Applications
25
Travels
6
Photo
21
Education
18
Games
25
Internet
14
Music
8
Technique
10
Video
6
Windows
5
Apple
2
Cell Phones
3
TikTok
216
Trips
2
House
1
Operating System
5
Tips & Tricks
892
Solutions
6
Tutorials
3
FAQ
1
Applications
5
Cell Phones
2
Tutorials
4
Computers
6
Tutoriales
2
8
Technology
2
In Computers
1
In Applications
2
Tutorials Tutorials
9
Applications Applications
25
Aplicaciones Applications
4
Devices Devices
5
Tutoriales Tutorials
1
Tutorials u00a0 Tutorials
2
Applications u00a0 Applications
2
Devices u00a0 Devices
1
OS OS
1
Etc Etc
2
Most popular questions within the last 30 days
Please leave a comment about whether the solution works or not (with device model)
[X]Close
10,659
questions
10,791
answers
510
comments
3
users