Skip to content

scripts: Rspamd stabilization pt. 2#3282

Merged
georglauterbach merged 7 commits intomasterfrom
rspamd/scripts2
Apr 23, 2023
Merged

scripts: Rspamd stabilization pt. 2#3282
georglauterbach merged 7 commits intomasterfrom
rspamd/scripts2

Conversation

@georglauterbach
Copy link
Copy Markdown
Member

@georglauterbach georglauterbach commented Apr 23, 2023

Description

  1. Moves rspamd-commands.conf to rspamd/custom-commands.conf & adjusts tests and the documentation accordingly
  2. Added new tests to test partial Rspamd uses as well

Related to #3249

Type of change

  • Improvement (non-breaking change that does improve existing functionality)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (README.md or the documentation under docs/)
  • If necessary I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Because we link `/tmp/docker-mailserver/rspamd/override.d` to
`/etc/rspamd/override.d`, I think it makes sense to move the modules
adjustment file into `/tmp/docker-mailserver/rspamd/` as well.

I write the code in a way that it is backwards compatible for now, so
this is NOT a breaking change.
The expansion of `ARGUMENT3` is now done in a way that only adds the
whitespace in case the variable is set and not null.
Because we're now linking `rspamd/override.d/`, we can simplify the
setup a bit. But this requires a change in directory structure.

The current Rspamd test will be renamed to `rspamd_full.bats`, because I
plan on adding more tests in different files for different feature sets.
This is done to make this feature well-tested!
FYI: The line

```bats
_run_in_container grep 'sieve_global_extensions.*\+vnd\.dovecot\.pipe'
"${SIEVE_CONFIG_FILE}"
```

was testing a condition that should actually not be met, but when I
started working on this feature, I thought this was the correct
configuration. Adding the `assert_success` statements revealed this
wrong line.

I also added tests to check whether `override.d` is linked correctly.
We now test that warnings are emitted & features are disabled correctly.
@georglauterbach georglauterbach added area/security area/scripts kind/improvement Improve an existing feature, configuration file or the documentation kind/update Update an existing feature, configuration file or the documentation service/security/rspamd labels Apr 23, 2023
@georglauterbach georglauterbach added this to the v12.1.0 milestone Apr 23, 2023
@georglauterbach georglauterbach self-assigned this Apr 23, 2023
@github-actions
Copy link
Copy Markdown
Contributor

Documentation preview for this PR is ready! 🎉

Built with commit: 395db0c

@georglauterbach
Copy link
Copy Markdown
Member Author

Merging this without review as it is well tested (and mostly actually just adding tests).

@georglauterbach georglauterbach merged commit cd17213 into master Apr 23, 2023
@georglauterbach georglauterbach deleted the rspamd/scripts2 branch April 23, 2023 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/scripts area/security kind/improvement Improve an existing feature, configuration file or the documentation kind/update Update an existing feature, configuration file or the documentation service/security/rspamd

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant