Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dovecot] spam mailbox is not created #1456

Open
pedro-nonfree opened this issue Sep 26, 2019 · 7 comments
Open

[dovecot] spam mailbox is not created #1456

pedro-nonfree opened this issue Sep 26, 2019 · 7 comments
Labels
📫 Email 👾 bug Something isn't working

Comments

@pedro-nonfree
Copy link

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
@Psycojoker Psycojoker added 👾 bug Something isn't working 📫 Email labels Oct 14, 2019
@zeroheure
Copy link

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
Copy link

ghost commented Apr 4, 2023

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
Copy link

chri2 commented Sep 29, 2023

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
Copy link

No, not yet. Lack of Time, sorry.

@chri2
Copy link

chri2 commented Oct 2, 2023

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
Copy link

chri2 commented Oct 26, 2023

Some notes for ongoing work:

  • /usr/share/yunohost/conf/dovecot contains the default configuration file.
  • it offers via pre-ext.conf and post-ext.conf the option to include some more configuration
  • all the files in /etc/dovecot/conf.d/ are ignored including 10-mail.conf and 15-mailboxes.conf to create automatically folders and tell dovecot of there special usage**?!**

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
Copy link

chri2 commented Oct 31, 2023

Missing parts:

  • adjust antispam_spam & antispam_trash for rspamd integration
    done: YunoHost/yunohost@e6e58ec

  • change global sieve script into a user sieve script that is copied on user creation (hook)

chri2 added a commit to chri2/yunohost that referenced this issue Nov 7, 2023
This will disable global sieve scripts in favour of a default sieve script being installed to the users sieve directory when new users are created.

YunoHost/issues#1456 (comment)
chri2 added a commit to chri2/yunohost that referenced this issue Nov 7, 2023
This is the  default sieve filter for new users: move spam into folder `Junk`.

YunoHost/issues#1456 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📫 Email 👾 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants