Mail: enable spam training through imap-sieve #61

Merged
rouven0 merged 4 commits from imap-sieve into main 2023-09-06 12:29:24 +02:00
rouven0 commented 2023-09-03 22:28:04 +02:00 (Migrated from github.com)

Trains the Spam filter with mails moved to spam and the ham database with mail moved out of the spam folder.

https://doc.dovecot.org/configuration_manual/howto/antispam_with_sieve/

Currently the actual Sieve scripts have to live stateful in /var/lib/dovecot/imap_sieve since they have to be compiled in a rw environment. Alternative would be some wonky solituion using packaging like here:
https://github.com/freifunkhamburg/mail2-nixos-config/blob/master/sieve-report-spam-ham.nix
As an alternative to that I could try to build something with systemd.

Weirdly, on my private machine /var/lib/dovecot/imap_sieve was created by some service automatically. But I could not reproduce that and still have no clue with service ever created it.

Trains the Spam filter with mails moved to spam and the ham database with mail moved out of the spam folder. https://doc.dovecot.org/configuration_manual/howto/antispam_with_sieve/ Currently the actual Sieve scripts have to live stateful in /var/lib/dovecot/imap_sieve since they have to be compiled in a rw environment. Alternative would be some wonky solituion using packaging like here: https://github.com/freifunkhamburg/mail2-nixos-config/blob/master/sieve-report-spam-ham.nix As an alternative to that I could try to build something with systemd. Weirdly, on my private machine `/var/lib/dovecot/imap_sieve` was created by some service automatically. But I could not reproduce that and still have no clue with service ever created it.
rouven0 commented 2023-09-04 13:13:22 +02:00 (Migrated from github.com)

Imap-Sieve scripts are now put into /etc/dovecot/sieve. Only weirdness is that you get the following error from time to time:

dovecot[159654]: imap(rouven)<159776><TeKubYYETKggAwDjPxqiADrVev/+v7pd>: Error: sieve: binary /etc/dovecot/sieve/report-spam.svbin: save: failed to create temporary file: open(/etc/dovecot/sieve/report-spam.svbin.) failed: Permission denied (euid=1000(rouven) egid=100(users) missing +w perm: /etc/dovecot/sieve, dir owned by 0:0 mode=0755)

Besides that it works just fine.

Imap-Sieve scripts are now put into /etc/dovecot/sieve. Only weirdness is that you get the following error from time to time: ``` dovecot[159654]: imap(rouven)<159776><TeKubYYETKggAwDjPxqiADrVev/+v7pd>: Error: sieve: binary /etc/dovecot/sieve/report-spam.svbin: save: failed to create temporary file: open(/etc/dovecot/sieve/report-spam.svbin.) failed: Permission denied (euid=1000(rouven) egid=100(users) missing +w perm: /etc/dovecot/sieve, dir owned by 0:0 mode=0755) ``` Besides that it works just fine.
fugidev (Migrated from github.com) approved these changes 2023-09-06 12:27:38 +02:00
fugidev (Migrated from github.com) left a comment

lgtm :)

lgtm :)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: wurzel/fruitbasket#61
No description provided.