darix / dovecot-sieve-antispam-rspamd

Dovecot Antispam with Sieve (and rspamd)

Home Page:https://wiki.dovecot.org/HowTo/AntispamWithSieve

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Proper way to modify sieve scripts

Smarre opened this issue · comments

Hi,

It looks like that actual spam dir is hardcoded in sieve scripts. In some setups, it makes sense to use different spam folder, so the path needs to be changed. I can’t find any proper way to override the existing sieve scripts so that they would not be replaced with updates.

Probably there should be a configuration option to specify additional directory to load configs from (with similar idea with rspamd’s local.d and override.d), which would replace the sieve script in system if the name matches.

Another option would be that actual files can be specified in the config, but I suppose that would be inconvenient if any new files gets added.

Actually it looks like this specific script is fairly trivial to override with sieve_before in 99-antispam_with_sieve.conf. So I guess my use case isn’t valid. That feature may have some merit still though.

commented

This needs support from pigeonhole. in theory one could query the special folder Junk and then use that. then we wouldnt need to hard code the folder path at all but could query the configured value from the dovecot configuration. I was told that it is on the backlog for dovecot but not done yet.

Okay, thanks for digging out this info :)