Filtering Spam in RainLoop, AutoReply and Email Filters with Sieve

I can confirm the original post is working on Ubuntu 22.04 LTS with the following fixes and caveats:

  1. Always run sudo apt-get update or equivalent before making changes to CyperPanel and its components. Otherwise you risk mismatch in component versions.

  2. In step 2, append “sieve” AND ‘lmtp’ in protocols on the first line of /etc/dovecot/dovecot.conf:

protocols = imap pop3 lmtp sieve

  1. Again in dovecot.conf pay attention to these lines and replace with your domain:
postmaster_address = [email protected]
hostname = mail.mydomain.com

@usmannasir it would be nice to point this out in the guide, since the code snippet is long and it’s not immediately apparent that changes should be made to it.

  1. Again in dovecot.conf: the autocreate plugin has been deprecated for a long time and is no more included in dovecot. So remove it from the list of active plugins in this line:
    mail_plugins = $mail_plugins autocreate sieve quota
    THE LINE APPEARS TWICE, under protocol lda { and protocol lmtp {
    it should then read:
    mail_plugins = $mail_plugins sieve quota
    I did NOT remove the line lda_mailbox_autocreate = yes

  2. The fixed line in Step 4, when doing nano /etc/postfix/master.cf is wrong, as it is identical to the outdated one. The correct one is available in the linked reference and reads:

dovecot   unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient}

It should already be in master.cf though, so check before adding it.

I’m waiting for expiration of a vacation day interval to check if I get the same problem as @T21 . I installed Sieve today, so it will take some time.

This post summarizes various threads and comments, that I cannot recall and credit. But I’d like to thank all the users whose posts helped me to get Sieve working.

Have a nice day