Roundcube + Postfix + Dovecot + Sieve

Discussion in 'Server Operation' started by Pereirar2z, Feb 23, 2024.

  1. Pereirar2z

    Pereirar2z New Member

    Hi all, Thank you for any help provided. It will be highly appreciated.

    I'm running dovecot-2.3.21-1.x86_64 + dovecot-pigeonhole-2.3.21-1.x86_64 + roundcube 1.6.6 on my redhat server. Mailserver is working as expected with the exception of the filters. I've installed and configure everything that i'm aware of but unfortunatelly its not working. I already recreate all my configuration from scracth but no major improvements so far.
    At the moment my suspicious goes to the following:
    Dovecot is not loading this module: /usr/lib/dovecot/modules/lib90_sieve_plugin.so.

    But i have no idea what can I do more. Can you please help me?

    I've paste here the output of doveconf -n:
    Code:
    # 2.3.21 (47349e2482): /etc/dovecot/dovecot.conf
    # Pigeonhole version 0.5.21 (f6cd4b8e)
    # OS: Linux 4.18.0-513.11.1.el8_9.x86_64 x86_64 Red Hat Enterprise Linux release 8.9 (Ootpa) xfs
    # Hostname: xxxxxx.xxxxx
    auth_debug = yes
    auth_verbose = yes
    disable_plaintext_auth = no
    first_valid_uid = 1000
    listen = *
    log_path = /var/log/dovecot.log
    mail_debug = yes
    mail_location = maildir:/home/vmail/%d/%n/Maildir
    mail_plugins = acl mail_log notify
    mail_privileged_group = mail
    managesieve_notify_capability = mailto
    managesieve_sieve_capability = 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
    mbox_write_locks = fcntl
    namespace inbox {
      inbox = yes
      location =
      mailbox Drafts {
        special_use = \Drafts
      }
      mailbox Junk {
        special_use = \Junk
      }
      mailbox Sent {
        special_use = \Sent
      }
      mailbox "Sent Messages" {
        special_use = \Sent
      }
      mailbox Trash {
        special_use = \Trash
      }
      prefix =
    }
    passdb {
      args = /etc/dovecot/dovecot-sql.conf.ext
      driver = sql
    }
    plugin {
      sieve = ~/.dovecot.sieve
      sieve_default = /var/lib/dovecot/sieve/default.sieve
      sieve_dir = ~/sieve
      sieve_global = /var/lib/dovecot/sieve/global/
    }
    protocols = imap pop3 sieve lmtp
    service auth-worker {
      user = vmail
    }
    service auth {
      unix_listener /var/spool/postfix/private/auth {
        group = postfix
        mode = 0666
        user = postfix
      }
      unix_listener auth-userdb {
        mode = 0600
        user = vmail
      }
      user = dovecot
    }
    service lmtp {
      unix_listener /var/spool/postfix/private/dovecot-lmtp {
        group = postfix
        mode = 0600
        user = postfix
      }
    }
    service managesieve-login {
      inet_listener sieve {
        port = 4190
      }
      process_min_avail = 4
      service_count = 1
      vsz_limit = 64 M
    }
    service stats {
      unix_listener stats-reader {
        group = wheel
        mode = 0666
        user = dovecot
      }
      unix_listener stats-writer {
        group = wheel
        mode = 0666
        user = dovecot
      }
    }
    ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
    ssl_key = # hidden, use -P to show it
    userdb {
      args = uid=vmail gid=vmail home=/home/vmail/%d/%n/Maildir
      driver = static
    }
    verbose_ssl = yes
    protocol lmtp {
      mail_plugins = acl mail_log notify quota sieve
    }
    protocol sieve {
    info_log_path = /var/log/dovecot-sieve.log
      log_debug = category=sieve
      managesieve_implementation_string = Dovecot Pigeonhole
      managesieve_logout_format = bytes=%i/%o
      managesieve_max_compile_errors = 5
      managesieve_max_line_length = 64 k
    }
    
    On Round Cube I can set the filters that i need but as soon as i click save nothing happens.
    Can you please point me into another direction?

    Regards, Pereira
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    It might be easier to get a working e-mail system with ISPConfit. Dovecot and roundcube work well with ISPConfig setup.
    I do not know what is dovecot-pigeonhole, so no idea if it works with ISPConfig.
    ISPConfig is available from https://www.ispconfig.org/ispconfig/ .
    Installing ISPConfig is easy with auto-installer. While ISPConfig works on RedHat, the autoinstaller is not available for RedHat or CentOS systems. https://www.howtoforge.com/ispconfig-autoinstall-debian-ubuntu/
    My signature has link to e-mail setup with ISPConfig. More tutorials are on this Howtoforge system, for example https://www.howtoforge.com/ispconfig-email-account/
     
    Last edited: Feb 25, 2024
    Pereirar2z likes this.
  3. michelangelo

    michelangelo Active Member

    How did you install Dovecot?
    Have you already checked if the sieve port 4190 is accessible from localhost and from the internet?

    Is this port listed if you execute netstat?

    You could check with a sieve client like this one here: https://github.com/thsmi/sieve if Sieve works via this Sieve editor.
    Also the library path /usr/lib/ looks odd to me if we take into consideration that you are using a Red Hat distribution.
    The binary should be usually stored there: /usr/lib64/dovecot/lib90_sieve_plugin.so

    Also make sure that selinux is set to permissive so that it is not in enforcing mode and potentially interfering with Dovecot's or the processes of the webserver.
     
    Pereirar2z likes this.
  4. Pereirar2z

    Pereirar2z New Member

    Thank-you for answer @Taleman and the help provided but I really need to understand what wrong with my setup. Currently i'm not considering any other solution.

    Best Regards, Pereira
     
  5. Pereirar2z

    Pereirar2z New Member

    Hi @michelangelo ! Thank-you for your reply.
    Dovecot & all other components were installed via package manager of rhel8 distribution.
    Yes the service & port are running/open on the server and i can confirm that via command netstat:
    [xxx@xxx ~]# netstat -an | grep -i 4190
    tcp 0 0 0.0.0.0:4190 0.0.0.0:* LISTEN

    Also selinux is disabled on the server. I will try to debug with sieve client and let you kwon the result.
    Regards, Pereira
     
  6. Pereirar2z

    Pereirar2z New Member

    Hello, I've tested the sieve client but indeed this is something that we will not require because we must use roudcube web interface to access the mail server. Not sure what to test more and even from the logs I can't get any more hints about what's going on.
     
  7. michelangelo

    michelangelo Active Member

    The idea behind using/testing this editor is to check if Sieve is generally working or if there is an error specifically with Roundcube.
    If the editor did work (did it?) then you must check your Roundcube setup.
     

Share This Page