YunoHost / issues

General issue tracker for the YunoHost project
72 stars 8 forks source link

[dovecot] spam mailbox is not created #1456

Open pedro-nonfree opened 5 years ago

pedro-nonfree commented 5 years ago

Fresh new install (3.6.4.6), executed the install.yunohost.org , the postinstall, configured the DNS in provider as expected, letsencrypt, etc. - I did not touch anything manually.

Everything is fine, but when I configure an email account in thunderbird spam mailbox is not created (which is essential to train spam).

Compared to another handmade email instance, yunohost instance is ignoring the content of /etc/doveconf/conf.d/15-mailboxes.conf, check doveconf command in handmade instance [1] and yunohost instance [2]

[1] handmade instance

# doveconf | grep -i mailbox
lda_mailbox_autocreate = no
lda_mailbox_autosubscribe = no
lmtp_save_to_detail_mailbox = no
mailbox_idle_check_interval = 30 secs
mailbox_list_index = no
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave
  mailbox Borradores {
  mailbox "Correo no deseado" {
  mailbox Drafts {
  mailbox "Elementos eliminados" {
  mailbox "Elementos enviados" {
  mailbox Junk {
  mailbox Sent {
  mailbox "Sent Messages" {
  mailbox Trash {

[2] yunohost instance

# doveconf | grep -i mailbox
lda_mailbox_autocreate = no
lda_mailbox_autosubscribe = no
lmtp_save_to_detail_mailbox = no
mailbox_idle_check_interval = 30 secs
mailbox_list_index = no
mailbox_list_index_very_dirty_syncs = no
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext
zeroheure commented 2 years ago

This could be easily solved with a sieve rule. This rule would be part of rspamd integration with postfix and dovecot. I'm working on it.

ghost commented 1 year ago

I recently have had to use doveadm mailbox create -u USER Junk to do the trick for all users…

for user in $(yunohost user list | grep username | sed "s/    username: //"); do doveadm mailbox create -u $user Junk; done
chri2 commented 1 year ago

This could be easily solved with a sieve rule. This rule would be part of rspamd integration with postfix and dovecot. I'm working on it.

Did you already put work into this, @zeroheure ?

zeroheure commented 1 year ago

No, not yet. Lack of Time, sorry.

chri2 commented 1 year ago

I'd propose the following:

remove rules from /etc/dovecot/global_script/

Probably a different issue, but if a folder named junk does not exist (used by global rules), the execution of the rest of the users rules seems not to work.

This isn't what the user would expect and couldn't debug.

hook for new users

create a folder for junk

What this issue is about....

create message in folder for junk

Create a message in that folder warning the user not to delete the folder without changing the preconfigured rule.

create a rule in the users rule set

Move messages with X-Spam: Yes to that folder.

User then do see the rule and the dependency on the folder for spam in their interface. They can change the folder and the rule to their likings.

chri2 commented 1 year ago

Some notes for ongoing work:

If the above is correct I'd propose that we let dovecot generate the folders on first login by following the examples from conf.d .

chri2 commented 1 year ago

Missing parts: