1

Topic: Ideal anti-spam setup

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: Ubuntu 16.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): NginX
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi all

I'm very new to iRedMail, but are so far very impressed with how easy the setup is - so big thanks for that!

I decided to try out iRedMail in order to have full power of my mail, but more importantly over my spam setup, but I'm struggling a bit with this part, so hopefully someone can guide me in the right direction.

My wishes:

1) Obvious spam should be deleted

2) Potential spam should be moved to Junk folder (is this the guide to follow: https://docs.iredmail.org/move.detected … lder.html)

3) Users should be able to mark spam for future reference (is this the guide to follow: https://docs.iredmail.org/store.spamass … .sql.html)

4) Nice-2-have: Individual spam tress hold for each user (SpamAssassin values)

Hope someone will be kind enough to guide me a bit, and perhaps share experiences and setups?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Ideal anti-spam setup

Runberg wrote:

2) Potential spam should be moved to Junk folder (is this the guide to follow: https://docs.iredmail.org/move.detected … lder.html)

yes.

Runberg wrote:

3) Users should be able to mark spam for future reference (is this the guide to follow: https://docs.iredmail.org/store.spamass … .sql.html)

yes

Runberg wrote:

4) Nice-2-have: Individual spam tress hold for each user (SpamAssassin values)

This is easy with our iRedAdmin-Pro admin panel, but if you don't want to purchase it, it's fine with the sql command line tool.

FYI:

- https://docs.iredmail.org/amavisd.sql.db.html
- https://www.ijs.si/software/amavisd/README.sql.txt

3 (edited by Runberg 2018-07-20 16:04:17)

Re: Ideal anti-spam setup

ZhangHuangbin wrote:
Runberg wrote:

2) Potential spam should be moved to Junk folder (is this the guide to follow: https://docs.iredmail.org/move.detected … older.html )

yes.

I followed the guide, but even it is a fresh installation of iRedMail this setting already seemed to be added? - is it default in latest version?

ZhangHuangbin wrote:
Runberg wrote:

3) Users should be able to mark spam for future reference (is this the guide to follow: https://docs.iredmail.org/store.spamass … n.sql.html )

yes.

I tried to follow the guide, but when updating the database I get this error:

mysql> USE sa_bayes;
Database changed
mysql> SOURCE /root/bayes_mysql.sql;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 5
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 5
ERROR 1146 (42S02): Table 'sa_bayes.bayes_global_vars' doesn't exist
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 6
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 9
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 14
mysql>

Any good ideas?

Runberg wrote:

1) Obvious spam should be deleted
2) Potential spam should be moved to Junk folder

So my idea is that obvious mail should just be deleted, but potential (when in doubt) spam should be moved to the junk folder. I assume the last part is in place now, but what about the first part - deleting obvious spam?

Are these the parameters to "play" with in /etc/amavis/conf.d/50-user

$sa_tag_level_deflt  = 2.0;  # add spam info headers if at, or above that level
$sa_tag2_level_deflt = 6.2;  # add 'spam detected' headers at that level
$sa_kill_level_deflt = 6.9;  # triggers spam evasive actions (e.g. blocks mail)
$sa_dsn_cutoff_level = 10;   # spam level beyond which a DSN is not sent
$sa_crediblefrom_dsn_cutoff_level = 18; # likewise, but for a likely valid From
#$sa_quarantine_cutoff_level = 25; # spam level beyond which quarantine is off

And thanks for the link regarding the fourth idea - I think I will start working on that when everything else is in place smile

4

Re: Ideal anti-spam setup

Runberg wrote:
ZhangHuangbin wrote:
Runberg wrote:

3) Users should be able to mark spam for future reference (is this the guide to follow: https://docs.iredmail.org/store.spamass … n.sql.html )

yes.

I tried to follow the guide, but when updating the database I get this error:

mysql> USE sa_bayes;
Database changed
mysql> SOURCE /root/bayes_mysql.sql;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 5
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 5
ERROR 1146 (42S02): Table 'sa_bayes.bayes_global_vars' doesn't exist
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 6
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 9
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 14
mysql>

Any good ideas?

Solved - I replaced TYPE=MyISAM with ENGINE=MyISAM and it all seemed to be working smile
For others who might have a look at this post, the guide https://docs.iredmail.org/store.spamass … n.sql.html could use an update / rewrite for Ubuntu / latest versions ...