Author Topic: RoundCube vacation plugin  (Read 52285 times)

Offline sunnydt

  • Jr. Member
  • **
  • Posts: 56
RoundCube vacation plugin
« Reply #15 on: December 06, 2009, 05:40:20 PM »
I cant seem to get this to work either. Im using cpanel too. I think I am doing something wrong. Im getting a 600 error too. should I leave the driver as setuid? or change this? Also am I suppose to create tables in my database and if so how many fields should they have?

Offline n3rvio

  • Newbie
  • *
  • Posts: 1
RoundCube vacation plugin
« Reply #16 on: December 18, 2009, 12:59:46 PM »
Hi,
I install plugin vacation-1.6.3.tar.gz with setuid mode for roundcube;

$rcmail_config['driver'] = 'setuid';
$rcmail_config['setuid']['setuid_executable'] = '/usr/bin/squirrelmail_vacation_proxy';
$rcmail_config['setuid']['vacation_executable'] = '/usr/bin/vacation';
$rcmail_config['setuid']['vacation_flags'] = ''// See man vacation for valid flags
$rcmail_config['setuid']['vacation_message'] = '.vacation.msg';
$rcmail_config['setuid']['vacation_database'] = '.vacation.db';
$rcmail_config['setuid']['always_keep_message'] = true;


I compiled vacation-1.2.7.0 binary from linux (from here) and run it.

I copy the binary extra/vacation_binary/squirrelmail_vacation_proxy to /usr/bin/squirrelmail_vacation_proxy

In the logs I see no error, but the auto-reply messages are not saved.

Any ideas?

My contribution vacation/localization/es_ES.inc :rolleyes: ;
<?php
$labels 
= array();
$labels['vacation'] = 'Vacaciones';
$labels['autoreply'] = "Activar autorepuesta";
$labels['outofoffice'] = 'Configuracion del mensaje';
$labels['autoreplysubject'] = 'Asunto';
$labels['autoreplymessage'] = 'Mensaje';
$labels['autoreplybutton'] = 'Guardar';
$labels['mailforward'] = 'Reenvio de correo';
$labels['keepcopy'] = 'Mantener una copia del email';
$labels['forwardingaddresses'] = 'Reenviar al email';
$labels['forward'] = 'Configuracion de reenvio';
$labels['success_changed'] = 'Configuracion guardada';
$labels['failed'] = 'Configuracion erronea!'
?>

Offline jaspersl

  • Jr. Member
  • **
  • Posts: 10
RoundCube vacation plugin
« Reply #17 on: March 04, 2010, 02:28:50 PM »
Hi,

Perhaps a lame kick but the out of office / vacation plugin for Roundcube has quite a lot of bugfixes and improvements in error handling of the last releases.

If you still intend to use the plugin, vacation plugin 1.9.2 for Roundcube has just been released.

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
RoundCube vacation plugin
« Reply #18 on: March 04, 2010, 03:34:00 PM »
Our organization does not allow a user to set up their own forwards, due to archiving and retention policies. I was able to disable that ability in the older version I am now using. I don't see an easy way to disable forwards in this new version. Please consider adding that capability.
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline jaspersl

  • Jr. Member
  • **
  • Posts: 10
RoundCube vacation plugin
« Reply #19 on: March 04, 2010, 04:32:52 PM »
Quote from: ABerglund;25982
Our organization does not allow a user to set up their own forwards, due to archiving and retention policies. I was able to disable that ability in the older version I am now using. I don't see an easy way to disable forwards in this new version. Please consider adding that capability.


Ok, that should be fairly easy to accomplish,i'll add a config option for config.ini

But for now you can disable the forwards by commenting the lines in vacation.php, around line 165 and line 174. Please let me know if that works out for you.

How did you previously disable the forwards?

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
RoundCube vacation plugin
« Reply #20 on: March 04, 2010, 05:45:51 PM »
OK, now I'm not certain that I disabled it in the previous version. I'm currently using version 20091008, which does not appear to have the forward-setting capability. Or if it did, I excised it completely.

I will load and test stripping that out of this latest version and report back.
« Last Edit: March 04, 2010, 06:33:57 PM by ABerglund »
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
RoundCube vacation plugin
« Reply #21 on: March 04, 2010, 06:33:41 PM »
Have commented out the section on forwards, but have not been able to get the new version to work. Claims to have a permissions error when attempting to FTP to the IMAP server. Using the same server and info as works perfectly in that really early version.

Uncommented the Forwards section as a test, no change. Still get permissions error when attempting to upload.

This latest release using both a config.inc.php and config.ini is rather confusing, and the install options are not as clearly spelled out, in my opinion anyway. The early version is much easier to configure. I suspect my error is that I'm missing something in the FTP config. But there don't appear to be many options...
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline jaspersl

  • Jr. Member
  • **
  • Posts: 10
RoundCube vacation plugin
« Reply #22 on: March 05, 2010, 02:30:34 AM »
Quote from: ABerglund;25985
Have commented out the section on forwards, but have not been able to get the new version to work. Claims to have a permissions error when attempting to FTP to the IMAP server. Using the same server and info as works perfectly in that really early version.


What's the exact error you see on the screen? Do you get the error when getting or setting the vacation settings?

Quote

This latest release using both a config.inc.php and config.ini is rather confusing, and the install options are not as clearly spelled out, in my opinion anyway. The early version is much easier to configure. I suspect my error is that I'm missing something in the FTP config. But there don't appear to be many options...


I had to make an ini style configuration to have multiple host support. So if you offer your users two different IMAP hosts (A and B) to choose from, the multiple host support comes in handy. In earlier versions, both host A and B shared the same settings for FTP, like FTP host.

With the config.ini you can disable vacation tab for host A and have a FTP seperate configuration for host B. And host C might use sshftp.

You can probably accomplish the same with a single config.inc.php, but you'll get a bunch of nasty nested arrays. Config.inc.php still remains for shared configuration like dotforward, these settings are shared by setuid,sshftp and ftp.

However, if specific subjects in install.txt and readme.txt aren't clear to you, let me know.

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
RoundCube vacation plugin
« Reply #23 on: March 05, 2010, 11:22:21 AM »
Quote from: jaspersl;25988
What's the exact error you see on the screen? Do you get the error when getting or setting the vacation settings?


The error is displayed when attempting to write the file via FTP, but if the file already exists it can't be read, either. FTP logs on the IMAP server show that connection by the proper user was made, but transfer was not completed.

Quote from: jaspersl;25988
I had to make an ini style configuration to have multiple host support. So if you offer your users two different IMAP hosts (A and B) to choose from, the multiple host support comes in handy. In earlier versions, both host A and B shared the same settings for FTP, like FTP host.
I can see the value for that for other people, but hadn't considered that possibility since we connect to a single server.
« Last Edit: May 27, 2010, 02:59:10 PM by ABerglund »
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline jaspersl

  • Jr. Member
  • **
  • Posts: 10
RoundCube vacation plugin
« Reply #24 on: March 05, 2010, 11:58:12 AM »
Quote from: ABerglund;25993


The error is displayed when attempting to write the file via FTP, but if the file already exists it can't be read, either. FTP logs on the IMAP server show that connection by the proper user was made, but transfer was not completed.


It surprises me as I use the default ftp_put() method of PHP. Can you try again after editing ftp.class.php?

The downloadfile() and uploadfile() method supress errors, so I am wondering what the exact error looks like. Can you remove the '@' signs in the code?

So it looks like:
$result = ftp_put($this->ftp, $remoteFile, $localFile, FTP_ASCII);

Which FTP-server are you using? Some FTP-server configuration don't allow . (dot) files to be downloaded. Can you perhaps try it from the commandline, using an FTP-client like ncftp or whatever you prefer?

Quote

I can see the value for that for other people, but hadn't considered that possibility since we connect to a single server.


I recently looked at (managed)sieve scripts which can be used with Dovecot IMAP-server. That eliminates the need for FTP/setuid/sshftp if the IMAP-server supports Sieve scripts, it's been a while since I've run my own production mailserver.

Anyway, I wasn't so keen on supporting multiple-hosts either, but it seems a good thing to have more flexibility especially with exotic configurations I haven't thought of before :)

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
RoundCube vacation plugin
« Reply #25 on: March 05, 2010, 12:11:46 PM »
Quote from: jaspersl;25994
It surprises me as I use the default ftp_put() method of PHP. Can you try again after editing ftp.class.php?
No change in the error message after removing the '@'.

Quote from: jaspersl;25994
Which FTP-server are you using? Some FTP-server configuration don't allow . (dot) files to be downloaded. Can you perhaps try it from the commandline, using an FTP-client like ncftp or whatever you prefer?
The remote IMAP server (RHEL5) is running vsftp. I don't think there are any issues with (dot) files since the original version of the plugin still works perfectly. I'm leaning toward some sort of error in my config files for the plugin. I'm probably missing something fairly basic in one or the other. But since the documentation for the two files isn't clear (to me) what options and configs should go in which files, it's difficult for me to track down the problem.
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline jaspersl

  • Jr. Member
  • **
  • Posts: 10
RoundCube vacation plugin
« Reply #26 on: March 05, 2010, 12:56:41 PM »
Quote from: ABerglund;25996
No change in the error message after removing the '@'.

The remote IMAP server (RHEL5) is running vsftp. I don't think there are any issues with (dot) files since the original version of the plugin still works perfectly. I'm leaning toward some sort of error in my config files for the plugin. I'm probably missing something fairly basic in one or the other. But since the documentation for the two files isn't clear (to me) what options and configs should go in which files, it's difficult for me to track down the problem.


It's starting to make sense now. If I recall correctly, previous versions had passive mode on by default while the new style hasn't. Since there is no error (permission denied by the server), I suspect the firewall is key in this problem.

The current code in ftp.class.php looks like:

if (isset($this->cfg['passive']) && !ftp_pasv($this->ftp, TRUE)) {
}

Since the first statement evaluates to false, the latter isn't executed. Can you edit your config.ini so it looks a bit like this:

[default]
driver = "ftp"
passive = True

That should be all I guess.

Regarding the documentation, I'd hoped the comments in config.inc.php would be clear.

config.inc.php serves two purposes:

1) Configuration of default subject/body text if it's empty.
2) Provide configuration for dotforward class which acts a helper class for setuid,sshftp and ftp backend. It generally doesn't use any changes.

I can probably merge the dotforward config with config.ini but my first priority is to start on this ManagedSieve driver support.

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
RoundCube vacation plugin
« Reply #27 on: March 05, 2010, 06:02:40 PM »
Quote from: jaspersl;25997
Can you edit your config.ini so it looks a bit like this:

[default]
driver = "ftp"
passive = True
That fixed it. I had thought that I had seen something about passive being the default and so didn't think about that any farther. But I probably saw that in the old version, not the new. I guess I'm easily confused...

Thanks for your help.
« Last Edit: March 05, 2010, 06:18:05 PM by ABerglund »
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline jaspersl

  • Jr. Member
  • **
  • Posts: 10
RoundCube vacation plugin
« Reply #28 on: March 07, 2010, 04:41:50 AM »
Quote from: ABerglund;26002
That fixed it. I had thought that I had seen something about passive being the default and so didn't think about that any farther. But I probably saw that in the old version, not the new. I guess I'm easily confused...

Thanks for your help.


Thanx for reporting the issue. The documentation indeed tells that Passive = True is the default while the FTP-driver hasn't passive mode enabled by default.

The code is updated, so  in further releases 'passive = True' can be omitted.

BTW, I hope to have release 1.9.3 that allows you to turn off forwarding without hacks in the code. It's a setting can be used in config.ini

It should be done on Tuesday as I am quite busy with work.

Offline voltron81

  • Jr. Member
  • **
  • Posts: 42
RoundCube vacation plugin
« Reply #29 on: March 30, 2010, 11:58:20 AM »
Hi guys.
I'm trying to install this amazing plugin into my system with roundcube 0.3.1.
The server is based on Debian and as database I'm using MySQL.

I've installed the package validate and download the plugin in the roundcube.
I've activated the plugin in roundcube and now in settings I can see the Vacation tab.
But if I click on it I've this error:
Code: [Select]
CONFIGURATION ERROR

Vacation plugin: /ab/ cannot be executed by user ''
Please read the INSTALL instructions!


Now the problem is that I don't understand what I've to do when in the INSTALL.txt you say:
Code: [Select]
3) Open plugins/vacation/config.inc.php in your editor and change the settings if needed.
4) Configure plugins/vacation/config.ini and change the settings if needed.


What I would like to have is a simple autoresponder, that will send and email back with a standard text (the same for everybody).
Is then is simple enough, could be great to have option that every account can setup a personalized autoresponder message...

May somebody explain me what I need to setup?

Thanks
Michele