Roundcube Community Forum

Release Support => Requests => Topic started by: vigneshk on June 28, 2019, 01:24:39 PM

Title: Vacation out of office issue
Post by: vigneshk on June 28, 2019, 01:24:39 PM
Hi team,

i have certain doubts to be clarified before i paste out the errors.

Server 1 : ubuntu 14.04

Roundcube client 1.3.9 is installed in server 1.

I have configured this client with my mail server and able to login.

When i try to connect to manageseive  , the filters options in settings page i receive an error .

The manageseive settings host i have provided as 'localhost' and port 4190 and i am able to telnet.

My question here is will out of office option i.e manageseive filter option work here in server 1 or do i have to enable the same dovecot in my mailserver and connect to it?
Title: Re: Vacation out of office issue
Post by: JohnDoh on June 29, 2019, 02:22:46 AM
typically the managesieve server would be on the same host as your imap server or MDA. the idea is the filters are executed on the server side. that way they work whether you are logged into rc or not.
Title: Re: Vacation out of office issue
Post by: vigneshk on June 29, 2019, 04:36:27 AM
So no matter where ever we setup the Roundcube client the mail server which we are configuring has to have managesieve running ?
Title: Re: Vacation out of office issue
Post by: JohnDoh on June 29, 2019, 05:32:55 AM
Managesieve is only the name of service which provides the ability for clients to edit the sieve files so I guess as long as your MDA can read those sieve files it doesn't actually matter which server managesieve runs on. But typically yes, it runs on the IMAP server.
Title: Re: Vacation out of office issue
Post by: vigneshk on June 29, 2019, 11:16:25 AM
i am trying to run the manageseive on server 1 where the roundcube is installed , it is running but i get unable to connect to server error.

dovecot -n
# 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21 (92477967)
# OS: Linux 4.15.0-50-generic x86_64 Ubuntu 18.04.2 LTS
auth_mechanisms = login plain
disable_plaintext_auth = no
mail_location = mbox:~/mail:INBOX=/var/mail/%u
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
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 {
  driver = pam
}
plugin {
  sieve = file:~/sieve;active=~/.dovecot.sieve
  sieve_dir = ~/sieve
  sieve_global_dir = /var/lib/dovecot/sieve/
  sieve_global_path = /var/lib/dovecot/sieve/default.sieve
}
protocols = " lmtp sieve"
ssl_cert = </etc/dovecot/private/dovecot.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_key =  # hidden, use -P to show it
userdb {
  driver = passwd
}
protocol lmtp {
  mail_plugins = " sieve"
}

TELNET also works so the port is open :

telnet 127.0.0.1 4190
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
"IMPLEMENTATION" "Dovecot (Ubuntu) Pigeonhole"
"SIEVE" "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"
"NOTIFY" "mailto"
"SASL" "LOGIN PLAIN"
"STARTTLS"
"VERSION" "1.0"
OK "Dovecot (Ubuntu) ready."

Managesieve config file:

 $config['managesieve_port'] = '4190';
 $config['managesieve_host'] = '127.0.0.1';
 $config['managesieve_auth_type'] = 'plain';
 $config['managesieve_auth_pw'] = null;
 $config['managesieve_auth_cid'] = null;
 $config['managesieve_usetls'] = false;
$config['managesieve_conn_options'] = null;


I have tried with tls and also enabling ssl array verify the peer true / false / allowing only self signed nothing worked.

Seive Log:

  <9v7qlt66> S: "SIEVE" "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"
 <9v7qlt66> S: "NOTIFY" "mailto"
 <9v7qlt66> S: "SASL" "LOGIN PLAIN"
 <9v7qlt66> S: "STARTTLS"
 <9v7qlt66> S: "VERSION" "1.0"
 <9v7qlt66> S: OK "Dovecot (Ubuntu) ready."
 <9v7qlt66> C: AUTHENTICATE "PLAIN" "AHZpZ25lc2hrQHZ0aWdyZXNzLmNvbQB2aWduZXNoQDEyMw=="
 <9v7qlt66> S: NO "Authentication failed."
 <9v7qlt66> C: LOGOUT
 <9v7qlt66> S: OK "Logout completed."

Roundcube Error :

 <9v7qlt66> PHP Error: Unable to connect to managesieve on 127.0.0.1:4190 in /var/www/html/roundcubemail/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php on line 222 (GET /roundcubemail/?_task=settings&_action=plugin.managesieve)
 ERROR: Not currently in AUTHORISATION state (1)

Can i get some clarity from the above i have enabled seive logs either.
Have been trying this since long not able to find a solution for this.
Title: Re: Vacation out of office issue
Post by: JohnDoh on June 29, 2019, 01:08:14 PM
In the dovecot on the Roundube server it looks like you are storing sieve info in local files. So how does your MDA access that info? And you appear to have some auth problems - does Dovecot on the Roundcube server use the same auth backend as your IMAP server?

May be it would be easier to run managesieve and IMAP on the same Dovecot instance. I think that is what most people do.
Title: Re: Vacation out of office issue
Post by: vigneshk on July 01, 2019, 01:51:31 AM
What if i am using gmail as my imap server ?
how can make the filter section work in this case , i can only setup roundcube client on one server, how am i supposed to run imap on this server?
"your statement on dovecot and imap to run on same server" how does it work here , when i cant make any changes on gmail side?
Title: Re: Vacation out of office issue
Post by: JohnDoh on July 01, 2019, 02:54:03 AM
may be a client side filtering solution would be better for you, something like https://plugins.roundcube.net/packages/roundcube/filters ?
Title: Re: Vacation out of office issue
Post by: vigneshk on July 01, 2019, 04:47:52 AM
client side filtering solutions is what i am looking for , but this doesnt include the out of office option in the filters
Title: Re: Vacation out of office issue
Post by: SKaero on July 01, 2019, 11:15:47 AM
Client side filtering can never do out of office sending because the client would have to be running in order to send out emails.

If your using Gmail then you just need to go into Gmail and set the out of office message there.
Title: Re: Vacation out of office issue
Post by: vigneshk on July 01, 2019, 11:44:31 PM
Gmail was just an example to explain you mr. skaero.

We wanted to do that with our mail server ,  as i have already posted the errors we are facing, more likely i would like to know for out of office , the managesieve and dovecot has to connected from mail server end and it will no work on the client end ?
Title: Re: Vacation out of office issue
Post by: vigneshk on July 01, 2019, 11:46:56 PM
The main goal here is we are using application called vtigercrm , where we have customized Roundcube and put inside our application. client will login to his mailbox in our application using Roundcube client. So here we would like to have this out of office functionality.