managesieve

----Auto reply-------- 

 install Roundcube autoresponder with Dovecot on Centos 7

# vi /usr/share/roundcubemail/config/config.inc.php       OR   vi /var/www/html/roundcubemail/config/config.inc.php

 $config['plugins'] = array('archive', 'managesieve', 'password', 'zipdownload');

#  vi /usr/share/roundcubemail/plugins/managesieve/config.inc.php      OR   vi /var/www/html/roundcubemail/plugins/managesieve/config.inc.php


    $config['managesieve_port'] = 4190;    $config['managesieve_host'] = 'localhost';    $config['managesieve_vacation'] = 1;

 #   yum -y install dovecot*

 

#  vi /etc/dovecot/dovecot.conf

protocols = imap lmtp pop3 sieve

### Add this line Last

service managesieve-login {  inet_listener sieve {    port = 4190  }  service_count         = 1  process_min_avail     = 1 }

#  vi /etc/dovecot/conf.d/20-lmtp.conf


protocol lmtp {  postmaster_address = postmaster@mydomain.com  mail_plugins = $mail_plugins sieve }

#     vi /etc/dovecot/conf.d/20-managesieve.conf


  protocols = $protocols sieve service managesieve-login {  inet_listener sieve {    port = 4190  }  # } <- still commented, this was the problem!

#      vi /etc/dovecot/conf.d/15-lda.conf


protocol lda {  mail_plugins = $mail_plugins quota sieve }

#      vi /etc/dovecot/conf.d/90-sieve.conf


sieve = ~/.dovecot.sieve   sieve_global_path = /var/lib/dovecot/sieve/default.sieve   sieve_dir = ~/sieve   sieve_global_dir = /var/lib/dovecot/sieve/

[root@mail managesieve]#    systemctl restart dovecot

                                                  systemctl status dovecot

Job for dovecot.service failed because the control process exited with error code. See "systemctl status dovecot.service" and "journalctl -xe" for details.

Mar 24 15:14:17 mail dovecot[14632]: doveconf: Fatal: Error in configuration file /etc/dovecot/conf.d/90-acl.conf line 11: Unknown setting: ... { plugin

Mar 24 15:14:17 mail systemd[1]: dovecot.service: control process exited, code=exited status=89

Mar 24 15:14:17 mail systemd[1]: Failed to start Dovecot IMAP/POP3 email server.

[root@mail managesieve]#    vi /etc/dovecot/conf.d/90-acl.conf

     11plugin {

Troubleshoot Sieve and LMTP

When a sieve filter does not behave as expected, additional logging can be enabled in the #  vi /etc/dovecot/config.d/10-logging.conf configuration file. The setting to enable more logging is called “mail_debug”.

# Enable mail process debugging. This can help you figure out why Dovecot # isn't finding your mails. mail_debug = yes

After the above setting is changed, dovecot needs a restart to activate the changes. With the debug setting activated, log entries similar to the ones below can be found in the mail log.

dovecot: lmtp(28422): Debug: none: root=, index=, control=, inbox=  dovecot: lmtp(28422): Connect from local  dovecot: lmtp(28422): Debug: Loading modules from directory: /usr/lib64/dovecot  dovecot: lmtp(28422): Debug: Module loaded: /usr/lib64/dovecot/lib90_sieve_plugin.so  dovecot: lmtp(28422): Debug: auth input: mailuser system_groups_user=mailuser uid=500 gid=502 home=/home/mailuser  dovecot: lmtp(28422): Debug: changed username to mailuser  dovecot: lmtp(28422, mailuser): Debug: Effective uid=500, gid=502, home=/home/mailuser  dovecot: lmtp(28422, mailuser): Debug: fs: root=/home/mailuser/mail, index=, control=, inbox=/var/mail/mailuser  dovecot: lmtp(28422, mailuser): Debug: kCqdNP+n4VsGbwAAzku34w: sieve: using sieve path for user's script: /home/mailuser/.dovecot.sieve  dovecot: lmtp(28422, mailuser): Debug: kCqdNP+n4VsGbwAAzku34w: sieve: opening script /home/mailuser/.dovecot.sieve  dovecot: lmtp(28422, mailuser): Debug: kCqdNP+n4VsGbwAAzku34w: sieve: script binary /home/mailuser/.dovecot.svbin is not up-to-date  dovecot: lmtp(28422, mailuser): Debug: kCqdNP+n4VsGbwAAzku34w: sieve: script /home/mailuser/.dovecot.sieve successfully compiled  dovecot: lmtp(28422, mailuser): Debug: kCqdNP+n4VsGbwAAzku34w: sieve: executing script from /home/mailuser/.dovecot.sieve  dovecot: lmtp(28422, mailuser): kCqdNP+n4VsGbwAAzku34w: sieve: msgid=<50c2ff17-7986-3638-9745-1c39b372a0c7@gmail.com>: stored mail into mailbox 'Trash'  postfix/lmtp[28079]: A5BC2C0EA1: to=<mailuser@example.com>, relay=mail.example.com[private/dovecot-lmtp], delay=0.36, delays=0.14/0/0.07/0.15, dsn=2.0.0, status=sent (250 2.0.0 <mailuser@example.com> kCqdNP+n4VsGbwAAzku34w Saved)

---