rspamd changing spampolicy does not aply

Discussion in 'ISPConfig 3 Priority Support' started by elmacus, Sep 13, 2019.

Tags:
  1. elmacus

    elmacus Active Member

    Hi.
    Next of rspamd problem.
    I see in gui that there is wrong spamlevels on most accounts, so i try to change in gui, the file in /etc/rspamd/local.d/users is touched (timestamp is updated), nothing changed.
    I set same spam levels as Amavis in the policy, but these values is not propagated to the files. I change policy again, still wrong spam levels. Is it picking wrong values from database ?
    So custumer getting spam now.
    All files is 644.
    exampel, this client have reject at 5 and rewrite at 3 in ispconfig settings:

    ispc_spamfilter_user_6132 {
    priority = 5;
    rcpt = "@domain.test";

    apply {
    CLAM_VIRUS = 1010;
    JUST_EICAR = 1010;
    actions {
    "rewrite subject" = 6;
    "add header" = 6;
    reject = 10;
    greylist = null;
    }
    }

    }

    I can manually change the domain.test.conf to correct values.
    So what to look for to solve this ?
     
  2. elmacus

    elmacus Active Member

    If i create a new policy, it does follow that rule, so its wrong on all old policys. ( i did only set rspamd levels, no amavis rules)
     
  3. elmacus

    elmacus Active Member

    Nothing wrong in database: `spamfilter_policy`, have correct settings, 5 and 3.
    But i think the problem is that after you activate rspamd in system, you must change all policys, then push out setting again for each client.
    This is not fun to do manually, or its a bug.

    EDIT: it might actually just be enough to change the master policy after activating rsmapd.
    Looks ok now on this server.
     
    Last edited: Sep 13, 2019
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Use Tools > Resync if you want to update multiple items on your servers.
     
  5. elmacus

    elmacus Active Member

    Oh, you mean "Mailfilter" only ?

    Also i find that servers not yet activated gets the local files, and if i change policy after that, those servers does not get updated. So that could be what happens here.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    No, you probably have to update the mailboxes, not mail filters. It currently does not update existing mailboxes when you alter a policy, this will get implemented in the next version. Unlike amavisd, rspamd requires an update of each mailbox.
     
  7. elmacus

    elmacus Active Member

    What about aliases ? I cant seem to set rspamd for these in ispconfig, there files does not get updated. Should alias follow domain setting or the mailbox it points to ?

    Ok will try resync.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Probably domain. Just in case, select all mail-related options in resync for now. We will implement a more fine-grained approach for the next version.
     
  9. elmacus

    elmacus Active Member

    Resync solved my aliases, but i must resync again if i change domain policy, it follows the domain, not the box i points to, but that i guess is by design.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, that's intended.
     
  11. elmacus

    elmacus Active Member

    Thanks, i think i have a good understanding how it works at the moment.
    Now to learn how to adapt rspamd.
    Any clue on how to activate headers like spamassassin again ? I also think spamassassin rules is not active by default.
    Have you made any conf files yourself that you want to share ?
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    I did not adapt rspamd config and I do not plan to do so at the moment as it works perfectly fine for me in the way it is currently set up. Rspamd has an extensive and good documentation, so you should find anything you need there.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    I had a look at the code of the 3.1.15 release and it contained already the functions to update the rspamd files on policy change. Then I've used one of my test systems which contained already amavis accounts, activated rspamd, checked the policy files, altered the reject level and the files were written correctly. So everything is working correctly here, no resync neede. Maybe you altered the scores on the amavisd tab and not the rspamd tab?
     
  14. elmacus

    elmacus Active Member

    No.
    They are quite diffreent now also.
    The rspamd files are now updated when editing policy, it was the aliases that were not. Maybee my database got in better sync since i did resync mailboxes.
    Is your testsystem a multiserver ?
    Bear in mind that i actvate one server at a time, but rules are also written at updates on NOT activated servers, and they do not update again when i ativate them. <----- this was probably my initial problem and is solved via resync.
    Not sure if thats the problem here though since i see this on activated servers.

    So you now saying that if i change a domains policy to another policy (not editing policy), then alias SHOULD also follow ? It dont, need resync.
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    It does not matter if it is a single- or multiserver as changes are written to the datalog, you can see it in datalog viewer.

    This does not matter as the activation is per server (system > server config) anyway and not globally for all systems, so having mixed systems is no problem at all.

    This works fine as well, tested it today.
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    As an explanation how this works: The connection between spamfilter policies and the actual addresses is build trough the records that you find in spamfilter user/domain in ispconfig, when you update a policy, then all mappings that are defined there get updated.
     
  17. elmacus

    elmacus Active Member

    Well then there are some bugs that need to be found and ironed out. I have always installed according to the howtoforge, but errors might add upp over the years.
    Lets see next week if other people have the same bugs that i found.
     

Share This Page