tbaldur / cyberpanel-mods

Small changes to cyberpanel core installation
19 stars 7 forks source link

Suggestion: Sieve fix #6

Open master3395 opened 1 year ago

master3395 commented 1 year ago

When you install CyberPanel, you don't automatically install Sieve (Filter) with SnappyMail. Perhaps that is something for a mod since CP doesn't seem to include it.

https://community.cyberpanel.net/t/filtering-spam-in-rainloop-autoreply-and-email-filters-with-sieve/30637/2

How i fix it:

Almalinux 8.x

yum --enablerepo=gf-plus -y install dovecot23-pigeonhole
dnf install --enablerepo=gf-plus postfix3 postfix3-ldap.x86_64 -y
dnf install --enablerepo=gf-plus postfix3-pcre.x86_64 -y
iptables -I INPUT -p tcp --dport 4190 --syn -j ACCEPT
sudo firewall-cmd --permanent --add-service={http,https,smtp-submission,smtps,imap,imaps,pop3,pop3s}
netstat -tulpn | grep 4190
cp -r  /etc/postfix/master.cf /etc/postfix/master.cf.bak
cp -r  /etc/dovecot/dovecot.conf /etc/dovecot/dovecot.conf.bak

https://pastebin.com/raw/3vhEkQUq

touch /var/log/{dovecot-lda-errors.log,dovecot-lda.log}
touch /var/log/{dovecot-sieve-errors.log,dovecot-sieve.log}
touch /var/log/{dovecot-lmtp-errors.log,dovecot-lmtp.log}
mkdir -p /etc/dovecot/sieve/global
chown vmail: -R /etc/dovecot/sieve
chown vmail:mail /var/log/dovecot-*

Without spamassassin:

service dovecot restart && service postfix restart;
service dovecot status && service postfix status;

With spamassassin:

service dovecot restart && service postfix restart && service spamassassin restart;
service dovecot status && service postfix status && service spamassassin status;
tbaldur commented 1 year ago

In this case, you had to replace the snappymail with the dovecot-pigeonhole for it to work, correct?

From the snappymail repo, sieve should work without having to replace it, I will make a fresh install and have a look at it in the following days

master3395 commented 1 year ago

I had to add dovecot-pigeonhole, and edit the dovecot file, since the original CyberPanel file, does not include Sieve. I did not replace any other file than the Dovecot file, since CyberPanel fixed the Postfix file, so it includes sieve half way.

master3395 commented 1 year ago

Any progress on this?