Problem with the bayesian filtering

Discussion in 'Mail Gateway: Installation and configuration' started by Yossarian, Dec 4, 2018.

  1. Yossarian

    Yossarian New Member

    Joined:
    Dec 2, 2018
    Messages:
    5
    Likes Received:
    0
    Hi all,

    I recently set up the PMG to try it out thoroughly. In order to do so, I set it up on a Debian machine.
    Now most parts seem to work just fine, but Spamassassin just does not seem to do any sort of scanning of the mails. I have fed Spamassassin with 4000 ham and 100k spam mails via the sa-learn utility. Yet almost everything gets the score 0.
    I would really appreciate any advice getting that thing up and running.
     
  2. Yossarian

    Yossarian New Member

    Joined:
    Dec 2, 2018
    Messages:
    5
    Likes Received:
    0
    It seems that the pmg-filter is not using Spamassassin at all, as even the test string XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X is passing through.
     
  3. tom

    tom Proxmox Staff Member
    Staff Member

    Joined:
    Aug 29, 2006
    Messages:
    13,159
    Likes Received:
    352
    Seems you have an issue in your setup, maybe you mixed up the SMTP ports or your rule system.?

    See documentation for deployment help.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. heutger

    heutger Active Member

    Joined:
    Apr 25, 2018
    Messages:
    331
    Likes Received:
    78
    Where are this hams and spams from? Be careful feeding sa-learn with "foreign" spam and ham as it might not look like spam and ham you(!) usually get. I did the same failure.

    pmg-smtp-filter is SpamAssassin wrapped with some additional features around. So you might look at your mail log and mail headers to check, if PMG is really scanning your mails or you did mistakes in your setup.
     
  5. Yossarian

    Yossarian New Member

    Joined:
    Dec 2, 2018
    Messages:
    5
    Likes Received:
    0
    Hi Tom,

    thanks for your reply.
    I did not touch the SMTP-ports: 25 for incoming, external mails, 26 for internal, outgoing mails. In the trusted networks I have added the external IP of my outgoing mailserver /32.

    I did not touch the rules, except for disabling the quarantine - I prefer just the header modification.
    In the spam detector options everything is turned on. Max spam size is 50MB.

    The only "modifications" I have made to the system is the Lets Encrypt setup and fail2ban for http/https/ssh.

    :(
     
  6. Yossarian

    Yossarian New Member

    Joined:
    Dec 2, 2018
    Messages:
    5
    Likes Received:
    0
    Thanks for your reply. The incoming emails do get the X-SPAM-LEVEL: header, but it is empty.
    The ham was sourced from my own archive with 4000 mails. For the spam I downloaded from untroubled.org.

    I was hoping that at least the worst viagra-spam would be blocked with this input. The statistic in the interface is showing no differentiation between spam scores, which led me to the idea that perhaps it is not using spamassassin at all. I used sa-learn under the root account - is that the right account? Or do I have to specify another database?
     
  7. tom

    tom Proxmox Staff Member
    Staff Member

    Joined:
    Aug 29, 2006
    Messages:
    13,159
    Likes Received:
    352
    If you have a default ruleset, the gtube spamassassin test will work. If not, you have a configuration issue somewhere.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. heutger

    heutger Active Member

    Joined:
    Apr 25, 2018
    Messages:
    331
    Likes Received:
    78
    I won’t recommend to learn spam from external sources. Viagra spam okay, but my experience is, that after learning from such archives, „real spam“ isn’t considered as such, so collect your own spam. untroubled is also not such usable anymore as stated on their website.

    Yes, you’re learning the right database. However, if your score and your statistics are empty, your setup has problems as their is not only bayes, so no scores at all is strange.

    You may provide more information on your setup, mail flow, provide statistics information on overall flow, spam scores as well as a log extract for one message.
     
  9. Yossarian

    Yossarian New Member

    Joined:
    Dec 2, 2018
    Messages:
    5
    Likes Received:
    0
    I think I have found my problematic configuration change:

    I disabled the Quarantine/Mark Spam (Level 3) rule, as I assumed that Modify Header would suffice.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice