Closed eRJx closed 7 years ago
I am not our Perl dev. So only chrisno can clear this completely.
As a quick workaround you can copy only the lines with real variables from the config.conf to imapsync.pl, commenting out the 'use' and 'require' lines.
Perhaps this works until our dev could see what's the real problem.
Regards
Chris
I modified imapsync.pl :
`#!/usr/bin/perl
use strict; use DBI; use MIME::Base64; use Sys::Syslog; use LockFile::Simple qw(lock trylock unlock);
$Conf::db_conf{'host'} = "127.0.0.1"; $Conf::db_conf{'db'} = "roundcubemail"; $Conf::db_conf{'username'} = "imapsync"; $Conf::db_conf{'password'} = "onepassword";
my $lock_file = "/var/run/imapsync/imapsync-all.lock"; my $lockmgr = LockFile::Simple->make(-autoclean => 1, -max => 1); $lockmgr->lock($lock_file) || &log_and_die("can't lock ${lock_file}");
`and it working with console and corn. Original version imapsync.pl still not working.
Thans for your advice
Roman
Hi Roman,
first of all, try this in your crontab:
*/5 * * * * root cd /var/lib/roundcube/plugins/imapsync/bin/ && perl imapsync.pl >/dev/null 2>&1
Greetz chr1sn0
Hi chr1sn0
I tired and it not working. I tired lunch:
perl imapsync.pl
in console and I get same error:
'db_conf' is not a valid variable name at config.conf line 3.
BEGIN failed--compilation aborted at config.conf line 3.
Compilation failed in require at ./imapsync.pl line 20.
WARNING: releasing 1 pending lock...
Hi,
post ure config.conf pls (without PWD)
Greetz
package Conf;
use vars qw/ db_conf /;
$db_conf{'host'} = "127.0.0.1"; $db_conf{'db'} = "roundcubemail"; $db_conf{'username'} = "imapsync"; $db_conf{'password'} = "**";
1;
you missed a '%' in Line 3.
Correct:
use vars qw/ %db_conf /;
fixed it in our sample.
Greetz
Hi After your adjustment it work.
Greetz
cron job in /etc/crontab
*/5 * * * * root /var/lib/roundcube/plugins/imapsync/bin/imapsync.pl
not working and imap folders are not synchronized. When I ran imapsync.pl from console with folder /var/lib/roundcube/plugins/imapsync/bin/ I get error:
'db_conf' is not a valid variable name at config.conf line 3. BEGIN failed--compilation aborted at config.conf line 3. Compilation failed in require at ./imapsync.pl line 15. WARNING: releasing 1 pending lock...