Roundcube Community Forum

 

RoundCube vacation plugin

Started by peterruiter, July 07, 2009, 12:53:28 PM

Previous topic - Next topic

ABerglund

First, you need to have vacation support on the IMAP server as well. What are you using for that?
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

zeta67


dziobak

#32
My mistake. Please remove it...

ABerglund

Progress how? The current version is working fine for me.
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

miniwark

I have just try the vacation plugin
1.9.2 seems to work but 1.9.3 have at least two problems :

1) no confing.inc.php file in the zip file
(i have use the one from 1.9.2)
2) i have this strange message :
Vacation plugin: Driver '' cannot be loaded using plugins/vacation/lib/.class.php

with this config file :
[default]
driver = "setuid"
executable = "/usr/bin/squirrelmail_vacation_proxy"

(this same file did seems to works with 1.9.2)


Alternaly the config.mk for the squirrelmail_vacation_proxy is set to install squirrelmail_vacation_proxy binary in /plugin/extra and not in /usr/bin/ as said in the readme.txt

voltron81

Quote from: ABerglund;26493First, you need to have vacation support on the IMAP server as well. What are you using for that?

Hi,
sorry if I answer you just now.
As IMAP I'm using courier (imapd)

How can I have vacation support on the IMAP server?

Thanks
Michele

ericx

Quote from: miniwark;27968I have just try the vacation plugin
1.9.2 seems to work but 1.9.3 have at least two problems :

1) no confing.inc.php file in the zip file
(i have use the one from 1.9.2)
2) i have this strange message :
Vacation plugin: Driver '' cannot be loaded using plugins/vacation/lib/.class.php

with this config file :
[default]
driver = "setuid"
executable = "/usr/bin/squirrelmail_vacation_proxy"

(this same file did seems to works with 1.9.2)

I've managed to track the problem a bit more.

In VacationConfig.class.php, in function checkAllowedParameters(), the test for validity appears to be the line:

if (! empty($diff) && !in_array(key($diff),array('driver','body','subject'))) {

(at least, a return error value is set if this condition is true). However, at the bottom of the function, the return value is simply:

return (empty($diff));


Now I'm not sure I understand clearly how checkAllowedParameters() is supposed to work; but it seems to me that if "driver" "body" or "subject" are listed in the parameters, $diff is not going to be empty (If I'm reading it right, $diff should be the list of all parameters minus those specifically supported by the currently selected driver). The validity test will pass (because 'driver', 'body', and 'subject' are special cased); however, the routine will return FALSE because $diff isn't empty.

This means that no params are passed up from getCurrentConfig(); but at the same time, hasError isn't set.

---
On vaguely related topic: all the files in 1.9.3 unzip with permissions 666 and folders with permission 777. That's kind'a scary.

ericx

#37
Here is a patch for VacationConfig.class.php which I think addresses the just mentioned bug:

*** plugins/vacation/lib/VacationConfig.class.php~ Tue Mar  9 15:13:56 2010
--- plugins/vacation/lib/VacationConfig.class.php Fri Jun 11 17:23:03 2010
***************
*** 168,180 ****
  {
 
  $keys = $this->allowedOptions[$this->currentArr['driver']];
! $diff = array_diff_key($this->currentArr,array_flip(array_keys($keys)));
 
               
! if (! empty($diff) && !in_array(key($diff),array('driver','body','subject')))
  {
  // Invalid options found
! $this->hasError = sprintf("Invalid option found in config.ini for %s driver and section [%s]: %s is not supported",
  $this->currentArr['driver'],$this->currentHost,key($diff));
  }
  return (empty($diff));
--- 168,184 ----
  {
 
  $keys = $this->allowedOptions[$this->currentArr['driver']];
! $diff = array_diff_key($this->currentArr,
!       array_flip(array_keys($keys)),
!       array('driver' => 1,
!     'body' => 1,
!     'subject' => 1));
 
               
! if (! empty($diff))
  {
  // Invalid options found
! $this->hasError = sprintf("Invalid option found in config.ini for %s driver and section [%s]: '%s' is not supported",

This also makes it apparent that the values provided in the example config.ini are bogus: defaultbody and defaultsubject don't appear to be valid parameters.

albiz

Hi,

I have a problem with the vacation plugin. I Tried to use virtual driver and it seems to work but in config tab i get an
"Vacation plugin: Driver '' cannot be loaded using plugins/vacation/lib/.class.php"

error. After reading INSTALL.TXT,  README.txt, googling...... I can't find the solution, any suggestion?

I'm on debian + postfix (vistual users) + mysql + dovecot

here's my /plugins/vaction/config.ini


[default]
driver = "virtual"
defaultsubject = "Fuera de la oficina"
defaultbody = "default.txt"

[*** SQL/Virtual Driver ***]
dsn = &quot;mysql://<mydbuser>:<mypass>@localhost/<mailserverdb>&quot;
transport = &quot;vacation.<mydomain>&quot;
dbase = &quot;<mydatabase>&quot;
always_keep_copy = true
select_query = &quot;SELECT destination FROM %m.virtual_aliases WHERE source='%e' AN$
delete_query = &quot;DELETE FROM %m.virtual_aliases WHERE domain_id=%i AND source='%$
insert_query = &quot;INSERT INTO %m.virtual_aliases (domain_id,source,destination) V$
domain_lookip_query = &quot;SELECT id FROM mailserver.virtual_domains WHERE name='%d$
createvacationconf = true


Thanks in advance,

Sr.Albiz

blair.sawler

Hi jaspersl et. al.

I woul dlike to get this to work with cpanel, hostmonster, but need some direction. What can I tell you so you can help?

SKaero

The vacation plugin doesn't work with CPanel.

blair.sawler

For sure? Is there anyway we can get it to work? I want to upgrade from .2.2 but that is a deal breaker for me unfortunately. Once you offer the ability to users, kind of hard to take it away....

SKaero

The vacation plugin only supports SQL and LDAP where as you need to a custom system to interface with CPanel. It could be coded but its not available right now.

blair.sawler

I am not enough of a programmer to take that on, where we did have it for version .2, someone else must want this eh?

uod

I am hoping this thread is still being monitored.

Has anyone else had a problem with the newest version of Roundcube (0.4.2)  + the newest version of the Vacation (1.9.9) plugin?   Specifically, when I click on the "Vacation" tab in settings, the page displays outside of the intended frame.  I have attached a screenshot to demonstrate.

I am using a completely default installation of roundcube --- I did not modify any of the html/css/etc pages.

Anyone know what to do in this case?