rspamd always MX_MISSING

Discussion in 'Installation/Configuration' started by topogigio, Apr 22, 2024.

Tags:
  1. topogigio

    topogigio Member

    Hi,
    I noticed that my rspamd is always reporting MX_MISSING on every incoming email. I don't know when it started this, but sure not from the startup of the server.
    DNS resolution on the host works well, so I cannot explain this.
    ISPConfig is 3.2.11p2 running on debian 11
    any idea where I can point?
    thanks
     
  2. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    Well, _always_ is bad - anything not working properly?
    Keep in mind rspamd is written in python. I'm not up to speed but even if
    DNS resolution on the host works, doesn't mean it works for python
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=877785

    How did you try DNS resolution?
    ping somehost or $dig google.com MX
    ?
     
  3. topogigio

    topogigio Member

    I tried resolution with nslookup -> set q=mx -> any domains works
    Also dig:
    Code:
    dig google.com MX
    
    ; <<>> DiG 9.18.24-1-Debian <<>> google.com MX
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34788
    ;; flags: qr rd ra cd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
    
    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 1232
    ; PAD: (404 bytes)
    ;; QUESTION SECTION:
    ;google.com.                    IN      MX
    
    ;; ANSWER SECTION:
    google.com.             157     IN      MX      10 smtp.google.com.
    
    ;; Query time: 11 msec
    ;; SERVER: 10.77.1.64#53(10.77.1.64) (UDP)
    ;; WHEN: Mon Apr 22 11:12:56 CEST 2024
    ;; MSG SIZE  rcvd: 468
    
     
  4. michelangelo

    michelangelo Active Member

    Rspamd is written in C/C++ and uses LUA for some sort of extensibility or additional features that are supposed to be not part of the Rspamd C/C++ core.

    Regarding the issue, I would also check if the OP may have accidently (mis-)configured dedicated DNS servers in Rspamd, more info here: https://rspamd.com/doc/configuration/options.html#dns-options
     
  5. topogigio

    topogigio Member

    uh! you got it!

    Code:
    cat options.inc
    # Addrs local to this server.
    local_addrs = [
            "127.0.0.0/8",
            "::1",
            "10.77.1.61",
    ];
    
    # This list is generated by ISPConfig, place custom addresses/networks in local_networks.inc.
    local_networks = "/etc/rspamd/local.d/local_networks.inc";
    
    dns {
            nameserver = ["127.0.0.1:53:10"];
    }
    
    Is this a bug? A standard settings? I'm not using local bind servers this i really strange as fixed setting
     
  6. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    indeed, my head was thinking modules. In fact we are both wrong, it comes from
    src/plugins/lua/mx_check.lua:33 =)

    topogigio, well usually you have a local nameserver ( systemd ) accessible, so it is fine. It adds the caching layer and reduces the 9ms you'd need to lookup using external dns, however the :10 not sure
     
  7. michelangelo

    michelangelo Active Member

    Yeh, it seems to be a bug.
    This line should not exist on ISPConfig servers that have no DNS server installed.

    Either we need to remove this line on such servers or we need to install something like unbound as a lightweight substitute for Bind/PowerDNS.
     
    Last edited: Apr 22, 2024
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    You should have a local name resolver, especially when running a mail system. So there is no bug here; it's just a misconfiguration of your system that lacks an essential service.
     
  9. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    u thinking of this special service
    systemctl status systemd-resolved
    ? ^^ well, one should not expect it to be active and if someone does, should add a status/monitoring/log something somewhere
    or is it some bind config of ispconfig?
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

  11. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    which again I could quote
    add a "pay attention we expect something to run on that ip/port anyway" ?
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Which installs a local resolver automatically. So you must manually take actions not to get a local resolver, which the thread starter did, and we can not prevent the administrator of a server from overrides our setup and preventing certain services that are required from being installed or that he removes any services after the installation to cause his system not fully to operate.

    So, as usual, do not modify a well-working setup if you do not know what you are doing and the consequences it will have.
     
    ztk.me likes this.
  13. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    thank you for the clarification, should've done my research :D guess it's me who needs to buy you the coffee now
     
  14. michelangelo

    michelangelo Active Member

    I agree, that if one uses a mail system, that it is definitely recommended, that a local name resolver exists.
    However, I don't use the auto-installer and I didn't have a look at its the source code yet, but I think that it should show a warning message if one tries to install a full mail system, that a local DNS resolver should exist/is necessary.
     
    Last edited: Apr 22, 2024
  15. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    especially when you get to the point where you just use your own dns-resolver as it handles some company specific rules or lookups and resides next to the mx VM, not much latency there.
    is that rspamd-nameserver configureable?
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    You can configure and control every aspect of an ISPConfig system using config template overrides.
     
  17. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    ok, so not for the average joe :) but its a var
    fair enough though, ispconfig is meant to be in control
     

Share This Page