[Rspamd-Users] how to set up symbol to use it in force_actions

Ronny Seffner r.seffner at seffner-schlesier.de
Sat Jan 14 14:25:25 UTC 2023


Hi,

I've defined following in "external_services.conf" to scan mails for viruses (that seems to work - the new and problematic stuff is the BYPASS_VIRUS_CHECK part):

...
icap {
  servers = "127.0.0.1:1344"
  symbol = "ICAP_VIRUS";
  type = "icap";
  scheme = "scan";
  user_agent = "r-spam-d"
}

there is another configuration in "external_services_group.conf":

symbols {
  "ICAP_VIRUS" {
    weight = 1;
    description = "possibly found Malware";
  };
  "BYPASS_VIRUS_CHECK" {
    weight = 0.0;
    description = "user disabled virus checks";
  }
}

and then I set up "force_actions.conf" as follows:

rules {
  VIRUS_EXCEPTION {
    action = "rewrite subject";
    subject = "*** VIRUS-Verdacht *** %s";
    expression = "ICAP_VIRUS & !BYPASS_VIRUS_CHECK";
  }
}

last I set up behavior per user in "settings.conf":

...
ns1__seffner_de_rcpt {
  id = "ns1__seffner_de_rcpt";
  priority = low;
  rcpt = "@seffner.de";
  apply {
    BYPASS_VIRUS_CHECK = 0.0;
    actions {
      add_header = 4.0;
      reject = 8.0;
      rewrite_subject = 4.0;
    }
  }
}
...

Why symbol BYPASS_VIRUS_CHECK is not set in mails to "someone at seffner.de"?
Whats the meaning of this:

root at ns1 /etc/rspamd/local.d # rspamadm configtest
cannot find dependency on symbol BYPASS_VIRUS_CHECK for symbol FORCE_ACTION_VIRUS_EXCEPTION
syntax OK

How to do it (per user disable the subject rewrite if virus is found) the right way?



Mit freundlichen Grüßen

Ronny Seffner


More information about the Users mailing list