1

Topic: How to add my own spam rules?

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.2
- Linux/BSD distribution name and version: CentOS 6.5
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? NO
- Related log if you're reporting an issue:
====

How can I add my own spam rules example:
1. move all mails from *@*.SOME
2. move email which have in message body *ANY TEXT*

----

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

2

Re: How to add my own spam rules?

You can try Postfix 'header_checks' and/or 'body_checks':
http://www.postfix.org/postconf.5.html#header_checks
http://www.postfix.org/postconf.5.html#body_checks

3 (edited by Lexa83 2016-12-24 11:13:36)

Re: How to add my own spam rules?

 header lcl_SUBJECT_50 Subject =~ /(your timeshare|trump|walmart|wal-mart|mexico|trump's|nicotine|partner sleeping|snoring|solar energy|skincare|)\b/i 
 score lcl_SUBJECT_50 5.0 

This is what I used to add custom spam scoring to my setup for specific words in the subject line, giving it a 5.0 score
I added it in /etc/spamassassin/local.cf on Ubuntu 16.04lts