Skip to content

Commit

Permalink
Merge pull request #147 from NethServer/sdl-7180
Browse files Browse the repository at this point in the history
Set max_message size to 100MB in rspamd options NethServer/dev#7180
  • Loading branch information
stephdl authored Dec 4, 2024
2 parents 67bd45f + fe59595 commit ecbb6fd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rspamd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ Well-known ports
- `RSPAMD_bypass_score` If undefined (default) bypass rules are applied as
an accept prefilter. Set to a negative number to turn the rules to ham
score and run antivirus checks (e.g. `RSPAMD_bypass_score=-5.000`)
- `RSPAMD_clamavscansize` sets the maximum size (default 2 MB) for
email attachments scanned by ClamAV in Rspamd.
Attachments larger than this value are skipped to optimize performance.

## Volumes

Expand Down
1 change: 1 addition & 0 deletions rspamd/etc/rspamd/local.d/options.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ dns {
retransmits = 5;
nameserver = ["127.0.0.1:11336:1"]; # local unbound instance
}
max_message = 104857600;
2 changes: 2 additions & 0 deletions rspamd/usr/local/templates/antivirus.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ clamav {
servers = "{= env.clamav_endpoint =}";

action = "reject";
# If `max_size` is set, messages > n bytes in size are not scanned
max_size = {= env.clamavscansize | default(2000000) =};

scan_mime_parts = false;

Expand Down

0 comments on commit ecbb6fd

Please sign in to comment.