[Rspamd-Users] how to debug settings?

Vu Ngoc VU vvu+rspamd at drafree.fr
Thu May 2 07:23:51 UTC 2024


Hello,

I'm trying to set a setting to block some message from a user to some specific recipients (external domains).
By reading https://rspamd.com/doc/configuration/settings.html, it looked easy to do.

But I failed so bad with that task.

My fail tryouts:
- A: set conditions (match rules): authenticated + user + rcpt (list)
- B: set conditions (match rules): from + rcpt (list)
- C: set conditions (match rules): from + rcpt (single address)

Althought this one worked:
- D: set conditions (match rules): authenticated + user + rcpt (regex)

When my new setting (restricted) is not matched, it fall to « authenticated » one.

Could someone enlight me why I can only match with regex rule in rcpt?
Or teach me how to debug that settings evaluation by rspamd?


Example of settings dump:


*** Section settings ***
restricted {
     rcpt_mime [
         "bar at gmail.com",
         "foo at gmail.com",
     ]
     priority = "high";
     symbols [
         "restricted",
     ]
     user = "me at example.org";
     authenticated = true;
     apply {
         actions {
             reject = -30;
             graylist = null;
         }
     }
}
vip_users {
     apply {
         actions {}
     }
     rcpt [
         "bigboss at example.net",
         "ceo at example.org",
     ]
     id = "vip_users";
     priority = "high";
}
authenticated {
     apply {
         symbols_disabled [
             "SUBJ_ALL_CAPS",
             "MIME_UNKNOWN",
             "SUBJECT_ENDS_SPACES",
         ]
     }
     priority = "medium";
     authenticated = true;
}
whitelist {
     want_spam = true;
     rcpt [
         "spamlover at example.org",
         "spamadm at example.org",
     ]
     priority = "low";
}

*** End of section settings ***


Best regards,

-- 

Vu~


More information about the Users mailing list