Skip to content

Spamfilter White/Blacklist not checking for whitespaces

Hi,

In the Spamfilter -> White/Blacklist section, it's currently possible to create an entry with a leading whitespace in the email address field. When saved, ISPConfig doesn’t show any error and accepts the entry. However, the corresponding user config for Rspamd is not generated.

Steps to reproduce:

  1. Go to E-Mail -> Spamfilter -> Whitelist/Blacklist
  2. Create a new entry
  3. Select any Spamfilter user and set any priority
  4. Enter an email like " @test.de" (note the space at the beginning)
  5. The entry is saved, but no config is created under /etc/rspamd/local.d/users/

Expected behavior:

  • The system should warn about the whitespaces and prevent the entry from being saved.

Suggested fix:

  • Add a custom or global form validator to catch and block entries that start with whitespace.