Hi Baseloppe,
Unfortunately, we're not using the commercial version
This lack of support is got me seriously contemplating moving to Nethserver.
If anybody has any idea on dovecot and sieve, please let me know.
Hi geo77!
doveconf namespace
You should found something similar to this:
namespace inbox {
disabled = no
hidden = no
ignore_on_failure = no
inbox = yes
list = yes
location =
mailbox Drafts {
auto = subscribe
autoexpunge = 0
autoexpunge_max_mails = 0
comment =
driver =
special_use = \Drafts
}
mailbox Sent {
auto = subscribe
autoexpunge = 0
autoexpunge_max_mails = 0
comment =
driver =
special_use = \Sent
}
mailbox "Sent Messages" {
auto = no
autoexpunge = 0
autoexpunge_max_mails = 0
comment =
driver =
special_use = \Sent
}
mailbox Spam {
auto = create
autoexpunge = 0
autoexpunge_max_mails = 0
comment =
driver =
special_use = \Junk
}
mailbox Trash {
auto = subscribe
autoexpunge = 0
autoexpunge_max_mails = 0
comment =
driver =
special_use = \Trash
}
order = 0
prefix =
separator = /
subscriptions = yes
type = private
}
sudo doveadm mailbox list -u user@domain.lan
You should found something similar to this:
Trash
Drafts
Sent
Spam
INBOX
To move the spam to the Junk folder, you has to have enabled sieve script in Dovecot.
doveconf plugin
This is my output.
plugin {
quota = maildir:User quota
quota_rule = *:storage=0
sieve = /var/vmail/%Ld/%Ln/sieve-script
sieve_dir = /var/vmail/%Ld/%Ln
sieve_global_path = /var/vmail/default.sieve
sieve_storage = /var/vmail/%Ld/%Ln
}
Test your dovecot instance:
netcat localhost 4190
"IMPLEMENTATION" "Dovecot (Ubuntu) Pigeonhole"
"SIEVE" "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"
"NOTIFY" "mailto"
"SASL" "GSSAPI PLAIN"
"STARTTLS"
"VERSION" "1.0"
OK "Dovecot (Ubuntu) ready."
Create default.sieve into /var/vmail/
# sieve_global_path = /var/vmail/default.sieveHere you have a sieve script that does te task:
https://wiki2.dovecot.org/Pigeonhole/Sieve/Examplesrequire "fileinto";
if header :contains "X-Spam-Flag" "YES" {
fileinto "Spam";
}
Compile the script:
sievec default.sieve
Restart mail service
This should do the trick.