rspamd cluster not working

Discussion in 'Installation/Configuration' started by frashman, Feb 17, 2023.

  1. frashman

    frashman New Member

    Hello, I am trying to create a new setup based on Rspamd. I have two servers that act as mail and database servers. The web function is enabled only for ISPconfig itself, everything else is disabled.
    I'd followd these guides:
    • howtoforge.com /tutorial/ispconfig-multiserver-setup-debian-ubuntu/4/
    • howtoforge.com /replacing-amavisd-with-rspamd-in-ispconfig/
    Now I'm having trouble with the neighbouring setup. The two rspamd services can't see each other. These are the configs:
    Code:
    root@mail1:~ $ cat /usr/local/ispconfig/server/conf-custom/install/rspamd_options.inc.master
    local_addrs = [
        "127.0.0.0/8",
        "::1",
      ];
    local_networks = "/etc/rspamd/local.d/local_networks.inc";
    neighbours {
        mail1 {
            host = "https://mail1.example.com:8081";
            path = "/rspamd/";
        }
        mail2 {
            host = "https://mail2.example.com:8081";
            path = "/rspamd/";
        }
    }
    disable_hyperscan = true;
    Code:
    root@mail1:~ $ cat /usr/local/ispconfig/server/conf-custom/install/apache_apps.vhost.master
    [...]
    {tmpl_if name="use_rspamd"}
      <Location /rspamd>
        Require all granted
      </Location>
      RewriteEngine On
      RewriteRule ^/rspamd$ /rspamd/ [R,L]
      RewriteRule ^/rspamd/(.*) http://127.0.0.1:11334/ [P]
      Header set Access-Control-Allow-Origin https://mail2.example.com:8081
    {/tmpl_if}
    
    I use the "apache_apps.vhost.master" config because there is already an rspamd section. I meerly added the header option. The server address of mail2 points to mail1.

    The result is this:
    [​IMG]

    Does anyone have an idea what I am doing wrong?
     

    Attached Files:

  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    If you followed https://www.howtoforge.com/tutorial/ispconfig-multiserver-setup-debian-ubuntu/ there should be no amavis installed. So why did you do /replacing-amavisd-with-rspamd-in-ispconfig/ ?
    You configred port 8081, but instructions say it should be 443?
    If this was your first setup of ISPConfig, I would start again from null, and with added knowledge succeed better this time.
     
  3. frashman

    frashman New Member

    Sorry for the confusion. Of cause I didn't replace amavis with rspamd - it wasn't installed in the first place. But from this configuration I got the header option which I used in the apache config.

    I don't want to use port 443 because it's reserved for Roundcube and generally to minimise possible attacks. This is also the reason why I do not use any other services and just rely on the basic configurations. And since the default configuration from ispconfig already has the rewrite rules set in the apps.vhost, I really don't see the point of adding another vhost with the same configuration on port 443 - as described in the multisetup guide.

    edit: I just noticed that the header option isn't in the replacement guide. Anyway, please forget about this guide as it is irrelevant.
     
    Last edited: Feb 17, 2023
  4. frashman

    frashman New Member

    does anyone have a working rspamd cluster and can help me with this strange problem? are there any configurations i have missed?
     

Share This Page