Proper way to ignore local mailservers in rspamd

Discussion in 'Installation/Configuration' started by Blubmann1337, Mar 3, 2025.

  1. Blubmann1337

    Blubmann1337 New Member

    Hello everyone, I am looking for the right way in Rspamd to ignore all local mail servers from the outgoing spam check. I have already added the servers to the local networks, but I still get rejects when sending out in the range: ABUSE_SURBL (5.5) [xxx:rdns]
    ENVFROM_SERVICE_ACCT (1)
    NEURAL_SPAM_SHORT (0.492018) [0.984]
    BAYES_SPAM (0.394158) [72.61%]
    FORGED_SENDER
    What can I do?
     
  2. pyte

    pyte Well-Known Member HowtoForge Supporter

    To accomplish this first create a new map file that contains all the IPs of your local mailservers. You can call it whatever you want.

    /etc/rspamd/maps.d/local_mailservers.map:
    Code:
    10.10.10.10
    10.10.10.11
    10.10.10.12
    After that create or edit the file multimap.conf. I like to create/edit the file in the override.d directory, to make sure that the changes do not get overwritten by any updates:

    /etc/rspamd/override.d/multimap.conf:
    Code:
    LOCAL_MAILSERVER_WL {
          type = "ip";
          prefilter = true;
          map = "/${LOCAL_CONFDIR}/maps.d/local_mailserver.map";
          action = "accept";
      }
    
    This will work as a prefilter (run before most other checks). It checks for the connecting IP and if that IP matches any of the IPs in the map-file it will accept the message no matter what and add the symbol "LOCAL_MAILSERVER_WL".

    Make sure to reoload the rspamd service after creating these files and do a "rspamadm configtest" to see if everything is ok.
     
    Blubmann1337 and till like this.
  3. Blubmann1337

    Blubmann1337 New Member

    Hi pyte,

    thats what I am looking for. It works. Thank you
     
    pyte likes this.

Share This Page