Zentyal Forum, Linux Small Business Server
Zentyal Server => Installation and Upgrades => Topic started by: geo77 on May 25, 2019, 07:33:18 pm
-
Hi,
I just updgraded from 4.0 to 5.0, and can't update to 6.0, because it breaks my server.
In any case I am using Zentyal 5.0. The update has broken the way I was moving emails marked as SPAM by the mail filters into the users spam folder.
So I had a sieve.sogo file in every user's /var/vmail/domain.com/user folder and that would move the files that had SPAM headings into the spam folder.
Is there some other way that I can accomplish this in 5.0 either at the user or global level?
Thanks for any help..
-
Is there anybody in these forums?
-
Sometimes - but mostly other Zentyal users like you.
If you are using the commercial version, you have faster options.
-
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 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.sieve
Here you have a sieve script that does te task: https://wiki2.dovecot.org/Pigeonhole/Sieve/Examples (https://wiki2.dovecot.org/Pigeonhole/Sieve/Examples)
require "fileinto";
if header :contains "X-Spam-Flag" "YES" {
fileinto "Spam";
}
Compile the script:
sievec default.sieve
Restart mail service
This should do the trick.