Emails not being scanned by SpamAssassin

SYSTEM INFORMATION
OS type and version AlmaLinux 8.8
Webmin version 2.101
Usermin version 2.001
Virtualmin version 7.7
Theme version 21.04
Package updates All installed packages are up to date

Recently i’ve being getting a lot of spam ending in my inbox, i set it up to go to ./junk folder, cheking the headers i cant find X-Spam in them:

|**Return-Path:**|<redacted@gmail.com>| | --- | --- | |**X-Original-To:**|vitor@redacted.com.br| |**Delivered-To:**|vitor-redacted.com.br@redacted.com.br| |**Received:**|from mail-yw1-f182.google.com (mail-yw1-f182.google.com [209.85.128.182]) by redacted.com.br (Postfix) with ESMTPS id 9F709439CC for <vitor@redacted.com.br>; Fri, 18 Aug 2023 16:30:36 -0300 (-03)| |**DKIM-Filter:**|OpenDKIM Filter v2.11.0 redacted.com.br 9F709439CC| |**Authentication-Results:**|redacted.com.br; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=UHHT0yvi| |**Received:**|by mail-yw1-f182.google.com with SMTP id 00721157ae682-58c4dce9db8so13079847b3.1 for <vitor@redacted.com.br>; Fri, 18 Aug 2023 12:30:36 -0700 (PDT)| |**DKIM-Signature:**|v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692387035; x=1692991835; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=7pdo6aZgybY4FMQk7D4ItNLKwpgIBHG7VfyzugQgeZI=; b=UHHT0yvilaj6Cs7NjFM/28s7qpd33XboXvaoTeXnAbD7mt4mcBppVawv7VsarM/8qN OHvYaOlfcYCG/WoH7Yt1J3dHUn+YEBSXhxjUCbWLrglgISxpVsjJLaIuE9GgO3XFx3wv kZVjUngNAYHUoi0DAgQXtuG/Ow7xpdw/EuZC/No/nmZXSrsyPeEZn6BtnDZftEEghahU eU+pO1pKBUrHRQdRah10LbKzJRhx/bpFOHCybKAycdZ84B8BRk4D2jttTj4av2hjhzcd xlWG9ETu9OkjwFsF1ccQAQtzzjqg1Bsmno52Mh2WtdfKEkGkKQe1/NHidsMYqGErEd/W 9fog==| |**X-Google-DKIM-Signature:**|v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692387035; x=1692991835; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=7pdo6aZgybY4FMQk7D4ItNLKwpgIBHG7VfyzugQgeZI=; b=TipxTGLVmIUAO/INhW/TKlzIVSlmMWBZdF7Mucuffky+vUrBhK2s8A2YbFEGJacIjK ShTQAU4Ek0fXqnKEN/6aob3m+bcn/as4k4dK0+DRWAkmnTBCRGgAfClLwSu40c7lkyY7 mdjujIc42ZQ3uWFtU0Wz3e0r/vIppMMLfwSj2QfOJ4Nl+bC33qS6wvZBgQhE/1zDkQXb FYTyHNhiaYari4IzR0u1uM4eXVxJ1ShXW2q40TlQbqkOHExrcLjRgTUXNJqbchJl37tH WgpspMw3hBDt+3pSwI4h+E1lFwdLKhWIHVG7Hh5V8uUToRXhe25C/Ipu8Pru6vRnXXS1 iPJg==| |**X-Gm-Message-State:**|AOJu0Yygthd9dzleBFETPoBqdz4Ed86gd1Zv9KYhLCP4sSS9nDfDPD3K 4ydfRKcrtiZDzbLu3FVXUZ0eo3620YDjfTLIPSqeMt2uIKMXqA==| |**X-Google-Smtp-Source:**|AGHT+IE0xabxw7asPSS+xqySog1UGNwndO9iJc2LRWN8X9iqcE16ZBcAIOLtRXAe+Ncjs57736U68/ZlsWOMfY6Yzfs=| |**X-Received:**|by 2002:a0d:df82:0:b0:583:c105:8501 with SMTP id i124-20020a0ddf82000000b00583c1058501mr127465ywe.42.1692387034797; Fri, 18 Aug 2023 12:30:34 -0700 (PDT)| |**MIME-Version:**|1.0| |**From:**|Vitor Hugo <redacted@gmail.com>| |**Date:**|Fri, 18 Aug 2023 16:28:56 -0300| |**Message-ID:**|<CAMab-GemswEh26Ey1BuUh7PJ7-fPG43ssU89eCcpJQ6q3nHDyw@mail.gmail.com>| |**Subject:**|teste spam| |**To:**|vitor@redacted.com.br| |**Content-Type:**|multipart/alternative; boundary="000000000000081d5806033790ce"|

When checking /var/log/procmail.log file i see the following errors when messages arrive:

procmail: Rescue of unfiltered data succeeded procmail: Program failure (78) of "/bin/spamc" Line not terminated with a newline in /etc/mail/spamassassin/spamc.conf ERROR: Could not connect to clamd on LocalSocket /run/clamd.scan/clamd.sock: Permission denied

The file /etc/mail/spamassassin/spamc.conf only has:

-d 127.0.0.1

spamd child and lookup-domain are running:

Any ideias where to go from here?

Edit: I’ve found this in the old forum that has the same log error except my mails dont get stuck in mailq so the problem is different: Postifx hold mail in mailq for a long time | Virtualmin

Seems like you have a broken spamc.conf so spamd isn’t running.

i’ve edited the spamc.conf file to the:

# connect to "server.example.com", port 783
    -d 127.0.0.1
    -p 783

    # max message size for scanning = 350k
    -s 350000

from https://spamassassin.apache.org/full/3.4.x/doc/spamc.html

now the

procmail: Rescue of unfiltered data succeeded procmail: Program 
failure (78) of "/bin/spamc" Line not terminated with a newline in 
/etc/mail/spamassassin/spamc.conf

doesnt show anymore but i still get:
ERROR: Could not connect to clamd on LocalSocket /run/clamd.scan/clamd.sock: Permission denied

The owner of clamd.sock is clamscan:clamscan permission 0666 and it has 0 bytes changed the folder permission to 0755 and the error is gone.

Solved it, the headers showed up and all the errors are gone:

X-Spam-Checker-Version: 	SpamAssassin 3.4.6 (2021-04-09) on redacted.com.br
X-Spam-Level: 	
X-Spam-Status: 	No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_HOTMAIL_RCVD2, FREEMAIL_FROM,HTML_MESSAGE,MIME_HTML_MOSTLY,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,TVD_SPACE_RATIO autolearn=no autolearn_force=no version=3.4.6

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.