1 (edited by RichieX 2018-05-18 23:42:26)

Topic: No spam checks

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.8 MYSQL edition
- Linux/BSD distribution name and version: Ubuntu 18.04 LTS
- 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.
====
I have installed iredmail in a VM box and can send/receive mails for my domain. Everything works perfectly only the spamfilter are not working.

The mail header from all mails looks like
X-Virus-Scanned: Debian amavisd-new at lxmail.xxxx.xx
X-Spam-Flag: NO
X-Spam-Score: 0
X-Spam-Level:
X-Spam-Status: No, score=x tests=[] autolearn=unavailable

I can post necessary files (logs/confs) to analyse problem.

RichieX

Edit: Attached amavis conf file.
Edit2:

syslog at received mail from gmail:
---
May 18 17:37:00 lxmail amavis[30177]: (30177-01) Passed CLEAN {RelayedInbound}, [209.85.215.45]:35700 [209.85.215.45] <xxxx@gmail.com> -> <info@xxxx.xx>, Queue-ID: 112A2FBFCA1, Message-ID: <CAJ46fkFu_=BS2wjQTYgRHJ6OoGxBfxxxxRpPRWoGj9baCOyfeA@mail.gmail.com>, mail_id: y-lY5zBwOAsi, Hits: -, size: 2654, queued_as: 5C0D1FBFCB3, dkim_sd=20161025:gmail.com, 193 ms
May 18 17:37:00 lxmail postfix/amavis/smtp[2130]: 112A2FBFCA1: to=<info@xxxx.xx>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.46, delays=0.25/0.01/0.01/0.19, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 5C0D1FBFCB3)
---

Post's attachments

50-user 29.83 kb, 1 downloads since 2018-05-18 

You don't have the permssions to download the attachments of this post.

2

Re: No spam checks

*) Please run SQL commands below as MySQL root user:

USE amavisd;
SELECT * FROM policy \G

*) Please enable debug mode in Amavisd and send one more testing email again, extract ALL logs related to this new testing email from Postfix log file (Amavisd logs to same file) and paste here for troubleshooting (you're free to replace real domain names). FYI: https://docs.iredmail.org/debug.amavisd.html

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

3

Re: No spam checks

I too am having the same exact problem. I purchased and installed IREDMAIL PRO about a week ago. SpamAssassin never runs.
I added this, $sa_tag_level_deflt  = -100; to 50-user and every single message says:

X-Spam-Flag: NO
X-Spam-Score: 0
X-Spam-Level:
X-Spam-Status: No, score=x tests=[] autolearn=unavailable

I have never seen a reference to SpamAssassin once in any log or email header.

Watching thread.

4

Re: No spam checks

Dear @bigdog,

Please show us output of my previous reply, We need them for troubleshooting.
https://forum.iredmail.org/post63021.html#p63021

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

5 (edited by RichieX 2018-05-21 15:01:48)

Re: No spam checks

Sorry for my late feedback.

The output from mysql command:
mysql> SELECT * FROM policy \G
*************************** 1. row ***************************
                          id: 1
                 policy_name: @.
                 virus_lover: N
                  spam_lover: Y
             unchecked_lover: NULL
          banned_files_lover: Y
            bad_header_lover: Y
         bypass_virus_checks: N
          bypass_spam_checks: N
        bypass_banned_checks: N
        bypass_header_checks: N
         virus_quarantine_to: virus-quarantine
          spam_quarantine_to: NULL
        banned_quarantine_to: NULL
     unchecked_quarantine_to: NULL
    bad_header_quarantine_to: NULL
         clean_quarantine_to: NULL
       archive_quarantine_to: NULL
              spam_tag_level: NULL
             spam_tag2_level: NULL
             spam_tag3_level: NULL
             spam_kill_level: NULL
       spam_dsn_cutoff_level: NULL
spam_quarantine_cutoff_level: NULL
        addr_extension_virus: NULL
         addr_extension_spam: NULL
       addr_extension_banned: NULL
   addr_extension_bad_header: NULL
              warnvirusrecip: NULL
             warnbannedrecip: NULL
               warnbadhrecip: NULL
              newvirus_admin: NULL
                 virus_admin: NULL
                banned_admin: NULL
            bad_header_admin: NULL
                  spam_admin: NULL
            spam_subject_tag: NULL
           spam_subject_tag2: NULL
           spam_subject_tag3: NULL
          message_size_limit: NULL
            banned_rulenames: NULL
          disclaimer_options: NULL
              forward_method: NULL
                 sa_userconf: NULL
                 sa_username: NULL
1 row in set (0.00 sec)

And syslog attached.

RichieX

Post's attachments

syslog.txt 44.83 kb, 1 downloads since 2018-05-21 

You don't have the permssions to download the attachments of this post.

6

Re: No spam checks

Here is the information you asked for. Looking at the log, this stands out.

May 21 23:55:52 mta amavis[24192]: (24192-01) no anti-virus code loaded, skipping virus_scan
May 21 23:55:52 mta amavis[24192]: (24192-01) no anti-spam code loaded, skipping spam_scan

I don't know why that would be. I did a straight install of iRedMail PRO and assumed that these would work. The only spam I'm killing is DNSBL hits.

Thanks, I have 2 more servers I need to set up and am probably going to use iRedMai PRO for these, but they must block spam and viruses.

7

Re: No spam checks

*) Did you modify any Amavisd config files (/etc/amavis/conf.d/*)?
*) Please update value of SQL column "policy.policy_name='@.'" (in "amavisd" database) to -100, then try to send a testing email to trigger this issue, extract all log lines related to this new testing email and paste here for troubleshooting.

bigdog wrote:

I don't know why that would be. I did a straight install of iRedMail PRO and assumed that these would work. The only spam I'm killing is DNSBL hits.

Don't worry, we will help you figure it out.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

8

Re: No spam checks

@bigdog, any error when you run command below?

perl -e "use Mail::SpamAssassin"

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

9

Re: No spam checks

Finally, i figured it out and here's the solution:

*) Open file /etc/amavis/conf.d/50-user, find the last line in this file:

1;

*) Add 2 lines ABOVE the last line:

# controls running of anti-virus/spam code: 0 -> enabled, 1 -> disabled.
@bypass_virus_checks_maps = (0);
@bypass_spam_checks_maps  = (0);

*) Restart Amavisd service.

This issue happens on Ubuntu 18.04, not other linux/bsd distribution releases.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

10

Re: No spam checks

Thank you! That worked.

BTW I am running Ubuntu 16.04, so it seems to have effected that version as well.

But all is well now!

Thanks again smile

11

Re: No spam checks

Spam check now working. Thanks @ZhangHuangbin.

Now i have error in maillog:

May 22 09:04:35 lxmail postfix/smtpd[20051]: disconnect from mail-lf0-f50.google.com[209.85.215.50] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7
May 22 09:04:35 lxmail amavis[19927]: (19927-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
May 22 09:04:36 lxmail amavis[19927]: (19927-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
May 22 09:04:36 lxmail amavis[19927]: (19927-01) (!)clamav-socket: All attempts (1) failed connecting to /var/run/clamav/clamd.ctl, retrying (2)
May 22 09:04:42 lxmail amavis[19927]: (19927-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
May 22 09:04:42 lxmail amavis[19927]: (19927-01) (!)clamav-socket av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamav/clamd.ctl (All attempts (1) failed connecting to /var/run/clamav/clamd.ctl) at (eval 113) line 659.\n
May 22 09:04:42 lxmail amavis[19927]: (19927-01) (!)WARN: all primary virus scanners failed, considering backups

How can i solve this?

12 (edited by RichieX 2018-05-22 15:35:44)

Re: No spam checks

I solved this error with uncommend line

AllowSupplementaryGroups true

in /etc/clamav/clamd.conf.

because errors in syslog

Mai 22 09:12:50 lxmail systemd[1]: Starting Clam AntiVirus userspace daemon...
Mai 22 09:12:50 lxmail mkdir[21304]: /bin/mkdir: cannot create directory â/run/clamavâ: File exists
Mai 22 09:12:50 lxmail systemd[1]: Started Clam AntiVirus userspace daemon.
Mai 22 09:12:50 lxmail clamd[21311]: ERROR: Parse error at line 90: Unknown option AllowSupplementaryGroups
Mai 22 09:12:50 lxmail clamd[21311]: ERROR: Can't open/parse the config file /etc/clamav/clamd.conf
Mai 22 09:12:50 lxmail systemd[1]: clamav-daemon.service: Main process exited, code=exited, status=1/FAILURE
Mai 22 09:12:50 lxmail systemd[1]: clamav-daemon.service: Failed with result 'exit-code'.
@lxmail:~$ service clamav-daemon start

13

Re: No spam checks

Both issues were fixed in the repacked iRedMail-0.9.8.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

14

Re: No spam checks

Thank you. Let the coffee taste good. wink

RichieX

15

Re: No spam checks

Thank you very much @RichieX. smile

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee