at the end of process: the fliters did not worked in individual accounts nor receiving emails in any ofthe server accounts.
I can send with no issues but i cannot received
The only difference Ihad with the settings was the first line:
Append “sieve” after ‘lmtp’ in protocols on the first line:
protocols = imap pop3 lmtp sieve
the difference was that i did not have lmtp on that line .
I have gone back correcting the settings to protocols = imap pop3 that is what I had at the beginning, ut still not working
gone through all again opened port 4190, hostname and postmaster changed to mine
and firewall opened,
21 sieve tcp 0.0.0.0/0 4190
still no emails through
Remove sieve and its configurations and your emails should start coming in again. Wait until there is a fix then try it again. After all, sieve with rainloop is beta.
Follow these steps:
sudo yum remove dovecot-pigeonhole -y
nano /etc/dovecot/dovecot.conf and remove the following: lmtp sieve in the first line then remove this: service auth {
unix_listener auth-client {
group = postfix
mode = 0660
user = postfix
}
unix_listener auth-master {
group = vmail
mode = 0660
user = vmail
}
Won’t risk I followed the instructions exactly as they appear and did not work. So until they are correct prefer spam. Even if with the set to delete (1) in server does not work either
Usually, this happens when the Spamassassin line in /etc/postfix/master.cf is wrong. Seen this on some installations.
If this is an existing installation then the below is how i setup that for all clients sieve to work by default to spam folder of Rainloop “INBOX.Junk E-mail”.
Please NOTE:
TO reverse these modifications the below commands can be used.
cp /etc/dovecot/dovecot.conf-bak /etc/dovecot/dovecot.conf
cp /etc/postfix/master.cf-bak /etc/postfix/master.cf
cp /etc/postfix/main.cf-bak /etc/postfix/main.cf
service dovecot restart && service postfix restart;
service dovecot status && service postfix status;
copy in the new base one via nano. Replace “server.example.com” with your hostname and example.com with your domain name.
nano /etc/dovecot/dovecot.conf
protocols = imap pop3 sieve
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/home/vmail/%d/%n/Maildir #mail_location = mdbox:/home/vmail/%d/%n/Mdbox
Sieve the global spam filter
sievec /etc/dovecot/sieve/default.sieve
Restart and check services are up and then test.
service dovecot restart && service postfix restart && service spamassassin restart;
service dovecot status && service postfix status && service spamassassin status;
Sent your test Junk email with the below in the body of the email:
XJSC4JDBQADN1.NSBN32IDNENGTUBE-STANDARD-ANTI-UBE-TEST-EMAILC.34X
If you get the this message but are not seeing the email in the inbox and permissions and everything else is right:
delivered via spamassassin service)
Open config file and change the below line
nano /etc/postfix/master.cf
From:
spamassassin unix - n n - - pipe flags=R user=spamd argv=/usr/bin/spamc -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
To:
spamassassin unix - n n - - pipe flags=DROhu user=vmail:vmail argv=/usr/bin/spamc -f -e /usr/libexec/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
If this is on Ubuntu the line might need to be using the Ubuntu lib path of /usr/lib/dovecot/deliver
spamassassin unix - n n - - pipe flags=DROhu user=vmail:vmail argv=/usr/bin/spamc -f -e /usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
Optional things that might be needed.
If you get this error:
spamc[7957]: connect to spamd on ::1 failed, retrying (#1 of 3): Connection refused
Create this file with the below value to ensure spamd listening on localhost
[root@srv ~]# cat /etc/mail/spamassassin/spamc.conf
-d 127.0.0.1
[root@srv ~]#
For new installations, without any email data, I typically use this version. This uses a universal namespace for the names so it works better with Dovecot 2.3.x and email clients similar to how the cPanel and other ones do out of the box
Install spamasassin via cyberpanel for new installations without existing email data and files all spam into “INBOX.Junk”
and
cp /etc/dovecot/dovecot.conf /etc/dovecot/dovecot.conf-bak-sieve
cp /etc/postfix/master.cf /etc/postfix/master.cf-bak-sieve
cp /etc/postfix/main.cf /etc/postfix/main.cf-bak-sieve
Please NOTE:
TO reverse these modifications the below commands can be used.
cp /etc/dovecot/dovecot.conf-bak /etc/dovecot/dovecot.conf
cp /etc/postfix/master.cf-bak /etc/postfix/master.cf
cp /etc/postfix/main.cf-bak /etc/postfix/main.cf
service dovecot restart && service postfix restart;
service dovecot status && service postfix status;
copy in the new base one via nano. Replace server.example.com with your hostname and example.com with your domain name.
nano /etc/dovecot/dovecot.conf
protocols = imap pop3 sieve
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/home/vmail/%d/%n/Maildir #mail_location = mdbox:/home/vmail/%d/%n/Mdbox
Sieve the global spam filter
sievec /etc/dovecot/sieve/default.sieve
Restart and check services are up and then test.
service dovecot restart && service postfix restart && service spamassassin restart;
service dovecot status && service postfix status && service spamassassin status;
Sent your test Junk email with the below in the body of the email:
XJSC4JDBQADN1.NSBN32IDNENGTUBE-STANDARD-ANTI-UBE-TEST-EMAILC.34X
If you get the this message but are not seeing the email in the inbox and permissions and everything else is right:
delivered via spamassassin service)
Open config file and change the below line
nano /etc/postfix/master.cf
From:
spamassassin unix - n n - - pipe flags=R user=spamd argv=/usr/bin/spamc -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
To:
spamassassin unix - n n - - pipe flags=DROhu user=vmail:vmail argv=/usr/bin/spamc -f -e /usr/libexec/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
If this is on Ubuntu the line might need to be using the Ubuntu lib path of /usr/lib/dovecot/deliver
spamassassin unix - n n - - pipe flags=DROhu user=vmail:vmail argv=/usr/bin/spamc -f -e /usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
Optional things that might be needed.
If you get this error:
spamc[7957]: connect to spamd on ::1 failed, retrying (#1 of 3): Connection refused
Create this file with the below value to ensure spamd listening on localhost
[root@srv ~]# cat /etc/mail/spamassassin/spamc.conf
-d 127.0.0.1
[root@srv ~]#
I got Sieve up and working on Cyberpanel 2.1.1 Centos 7
What I noticed was that Cyberpanel’s dovecot version was 2.3 but the dovecot-pigeonhole available was not for that version.
I tried downgrading but that did not work since the configurations of the newer dovecot was different and caused “Authentication Failed” when logging in. So I had to go back up to version 2.3
These are my steps:
N.B. Step one will update dovecot to the latest version. Please make sure to keep track of your current version in order to rollback if configuration files clash.
What you are aiming to do is to get dovecot-pigeonhole the same version as your current setup.
First setup dovecot repository following this link: