imapsync problem

uvhost

Verified User
Joined
Mar 26, 2006
Messages
58
Location
UK
Hi,

I am having the following error

/etc/cron.daily/custombuild:

Can't locate Encode/IMAPUTF7.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/bin/imapsync line 970.
BEGIN failed--compilation aborted at /usr/local/bin/imapsync line 970.
Can't locate Encode/IMAPUTF7.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/bin/imapsync line 970.
BEGIN failed--compilation aborted at /usr/local/bin/imapsync line 970.

also, CustomBuild shows an update for imapsync and when I try to update it, it says it's updated but still the update keeps appearing... how do i resolve this?
 
You might need to install imaputf7.
Have a look at this:

Maybe when doing this the recurring update will also disappear after running again.
 
You might need to install imaputf7.
Have a look at this:

Maybe when doing this the recurring update will also disappear after running again.


Hi,

I have followed it, but still same problem.

maybe it's a bug? and fix has not been issued? @smtalk
 
Is it CentOS7? If yes, try:
Code:
yum install https://driesrpms.eu/redhat/el7/en/x86_64/dries.all/RPMS/perl-Encode-IMAPUTF7-1.05-1.el7.rf.noarch.rpm
 
Seems Dries his website is down, he now has a fork of Repoforge on Github. That only handles EL3, 4, 5 and 6,.
The repoforge on github handles EL5, 6 and 7, however, when clicking on the EL7 rpm's, I get a timeout.
The instructions to install repoforge on repoforge.org don't work either anymore because there will be an error that the repo file can't be found on that server.
 
When our clients use this tool:
1657649715175.png

In "/var/log/messages" this error:
Code:
Jul 12 20:12:50 XXXXX directadmin: [{69353 1310 [/usr/local/directadmin/directadmin --userd] 2022-07-12 20:12:50.238291357 +0200 CEST}]
Jul 12 20:12:50 XXXXX directadmin: 2022/07/12 20:12:50 error executing imapsync migration failed error=exec: "imapsync": executable file not found in $PATH from=XXXXX@XXXXX to=XXXXX@XXXXX


We have the same problem for install Imapsync with custombuild, install IMAPUTF7 from CPAN and imapsync work:
Code:
[root@XXXXX custombuild]# /usr/local/bin/imapsync --version
2.178
 
When our clients use this tool:
View attachment 5690

In "/var/log/messages" this error:
Code:
Jul 12 20:12:50 XXXXX directadmin: [{69353 1310 [/usr/local/directadmin/directadmin --userd] 2022-07-12 20:12:50.238291357 +0200 CEST}]
Jul 12 20:12:50 XXXXX directadmin: 2022/07/12 20:12:50 error executing imapsync migration failed error=exec: "imapsync": executable file not found in $PATH from=XXXXX@XXXXX to=XXXXX@XXXXX


We have the same problem for install Imapsync with custombuild, install IMAPUTF7 from CPAN and imapsync work:
Code:
[root@XXXXX custombuild]# /usr/local/bin/imapsync --version
2.178
Code:
[root@XXXXX ~]# /usr/bin/imapsync  --version
2.178
[root@XXXXX ~]# su diradmin
bash-4.2$ /usr/bin/imapsync --version
Can't locate Encode/IMAPUTF7.pm in @INC (@INC contains: /root/perl5/lib/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/bin/imapsync line 970.
BEGIN failed--compilation aborted at /usr/bin/imapsync line 970.

Code:
[root@XXXXX ~]# cat /etc/redhat-release
CloudLinux release 7.9 (Boris Yegorov)

[root@XXXXX ~]# /usr/local/directadmin/directadmin version
Version: DirectAdmin v.1.641
 
bash-4.2$ /usr/bin/imapsync --version Can't locate Encode/IMAPUTF7.pm in @INC (@INC contains: /root/perl5/lib/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/bin/imapsync line 970. BEGIN failed--compilation aborted at /usr/bin/imapsync line 970.

Try running this command to add imapsync to a user's CloudLinux allowed commands:

cagefsctl --addrpm imapsync
 
All wrong, as always, Directadmin cares little or nothing if their software malfunctions:

1657729250408.png
1657729259109.png

Try running this command to add imapsync to a user's CloudLinux allowed commands:

cagefsctl --addrpm imapsync
Thanks for the advice, I've tried adding the rpm to cagefs, but Custombuild compiles imapsync from sources, it doesn't install it from the repository, which is a very old version.

Code:
[root@XXXXX custombuild]# cagefsctl --addrpm imapsync
Package imapsync not installed

However, we also believe that the problem may be related to CloudLinux security, but it is something that should have been tested in Directadmin. Thanks again for helping, it's already more than expected from Directadmin. For this client we have had to do the email migration manually from the console using imapsync, which has worked correctly, but we have more clients waiting, we do not understand why we pay Propack for our Lifetime licenses for these features that do not work correctly. :cry:
 
Last edited:
We do not understand why we pay Propack for our Lifetime licenses for these features that do not work correctly. :cry:
Why don't you send in a ticket then for this issue? Or did you already?

As for a solution from DA... was already given in post #7. Install from Cpan. But agreed, should be fixed.
 
Why don't you send in a ticket then for this issue? Or did you already?

As for a solution from DA... was already given in post #7. Install from Cpan. But agreed, should be fixed.

Yes, as indicated, we have installed IMAPutf7 from CPAN and this has allowed custombuild to correctly compile imapsync from source, running "build versions" you can see that it detects that the latest version of imapsync is installed, from root imapsync works correctly, but not from the users, which we believe is very possible that the problem is in the Cloudlinux permissions as the colleague Jamie has indicated. What bothers us is that a new functionality, only available by paying more for it, fails in an environment as common as CloudLinux, when Directadmin sells it, because it has not been tested on it.

Thanks, as always, Richard, for replying.
 
Well, I hope my answer will still help someone ( @Yoshua ).... I had this same problem... so, I have created a file /etc/cagefs/conf.d/imapsync.cfg containing:

Code:
[imapsync]
comment=imapsync
paths=/usr/local/bin/imapsync

Then I ran:

Code:
cagefsctl --force-update

And it finally started working making some clients happy.

My setup is DA on CloudLinux 8 (and beside custom installed MySQL 5.7, everything else is standard DA install packages).
 
I'm not using cloudlinux, followed @Yoshua guide. Still getting errors


/etc/cron.daily/custombuild:

Can't locate Encode/IMAPUTF7.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/bin/imapsync line 970.
BEGIN failed--compilation aborted at /usr/local/bin/imapsync line 970.
Can't locate Encode/IMAPUTF7.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/bin/imapsync line 970.
BEGIN failed--compilation aborted at /usr/local/bin/imapsync line 970.
 
@uvhost are you using bubblewrap? @smtalk could this be a problem where the process run isolated and it doesn't include the folder where Encode/IMAPUTF7 is installed?
 
@uvhost are you using bubblewrap? @smtalk could this be a problem where the process run isolated and it doesn't include the folder where Encode/IMAPUTF7 is installed?


Not using bubblewrap.

Really surprised, it's not fixed yet even after directadmin newer version.
 
@uvhost are you sure it is actually installed? It's not perl-Unicode-IMAPUTF7, and I see you got an error when trying to install the RPM Martynas indicated. That domain, driesrpms.eu, is not working so that could be the problem with that error...

So, try install this:
YAML:
yum install https://dev.lexmedia.ro/perl-Encode-IMAPUTF7-1.05-1.el7.rf.noarch.rpm
 
Last edited:
Back
Top