The system failed to read the maildirsize file

stomach

Registered
Jan 28, 2016
3
0
1
Brasil
cPanel Access Level
Root Administrator
It is going on with multiple accounts.

Code:
2016-01-28 09:46:00 The system failed to read the maildirsize file “/home/user/mail/domain.com/financeiro/maildirsize” because of an error: Failed to open “/home/user/mail/domain.com/financeiro/maildirsize”: Permission denied at /etc/exim.pl.local line 1946.
 

24x7server

Well-Known Member
Apr 17, 2013
1,912
99
78
India
cPanel Access Level
Root Administrator
Twitter
Hello,

Can you please check the permission and ownership of your /home/user/mail/domain.com/financeiro/maildirsize file ? And also check the cPanel and mail account disk quota.

Code:
ls -la /home/user/mail/domain.com/financeiro/maildirsize
 

gersonfs

Active Member
Sep 30, 2007
41
0
56
I am also with this same problem on multiple servers. It seems to be a problem after an upgrade from cPanel.

2016-01-28 14:05:00 The system failed to read the maildirsize file “/home/user/mail/domain/user/maildirsize” because of an error: Failed to open “/home/user/mail/domain/user/maildirsize”: Permission denied at /etc/exim.pl.local line 1946.

ls -lah /home/user/mail/domain/user/maildirsize
-rw-r----- 1 user user 3,4K Jan 28 14:05 /home/user/mail/domain/user/maildirsize

What would be the appropriate permissions and how to fix it in hundreds of accounts?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello :)

Internal case CPANEL-3807 is open to address the issue where "/usr/local/cpanel/scripts/mailperm" is unable to correct permissions for unreadable files due to attempting to complete the task via a file handle instead of a file name. Please monitor our change log to see when a resolution associated with this case has been released:

54 Change Log - Documentation - cPanel Documentation

Thank you.
 

ScOut3R

Registered
Apr 16, 2015
2
0
1
Hungary
cPanel Access Level
DataCenter Provider
Dear cPanelMichael,

according to the changelog it was fixed in version 54.0.6. I am running 54.0.8 and I still see this error in the logs, but only for one specific account. Is there something I can do to fix this error?

Kind regards,
Mate
 

cinusik

Active Member
Jul 31, 2003
38
1
158
cPanel Access Level
Root Administrator
Same thing on all our servers - looks like something is screwed up:

2016-01-29 15:32:01 The system failed to read the maildirsize file “/home/xxxxx/mail/xxxxx.com/ron/maildirsize” because of an error: Failed to open “/home/xxxxx/mail/xxxxx.com/ron/maildirsize”: Permission denied at /etc/exim.pl.local line 1946.

for all maildir files, please investigate that and fix ASAP. It happened after update to 54 version.

Tried to delete file and problem is still there after file is recreated. With every incoming file to the mailbox error is generated.
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
The output to /var/log/exim_mainlog is by design. The issue is that "/scripts/mailperm" is not correcting the permissions on the mail files. Could you let us know the specific error messages you receive when running the "/scripts/mailperm $username --verbose" command?

Thank you.
 

cinusik

Active Member
Jul 31, 2003
38
1
158
cPanel Access Level
Root Administrator
Issue fixed - just updated to latest release version 54.0.8, than run:
/scripts/mailperm
and maildirsize errors are gone.
Thanks for pointing this out cPanelMichael.
I also did not noticed mailperm script run during upcp update process so maybe this is cause of the problems with incorrect maildirsize permissions.
 

abrakadabra

Member
Dec 14, 2010
11
0
51
WHM 54.0 build 8

If maildirsize file is removed, it is recreated during exim delivery with user,group of username:username, which is wrong, i guess.

After running /scripts/mailperm <user> --verbose, the file is changed to user,group of username:mail. However, the file is again automatically changed to user,group of username:username during next exim delivery and therefore the /var/log/maillog errors persist.
 

cinusik

Active Member
Jul 31, 2003
38
1
158
cPanel Access Level
Root Administrator
WHM 54.0 build 8

If maildirsize file is removed, it is recreated during exim delivery with user,group of username:username, which is wrong, i guess.

After running /scripts/mailperm <user> --verbose, the file is changed to user,group of username:mail. However, the file is again automatically changed to user,group of username:username during next exim delivery and therefore the /var/log/maillog errors persist.
Yes, you are right. Errors are back after new email delivery.
 

Steve S.

Registered
Feb 1, 2016
1
0
1
Sonoma, CA
cPanel Access Level
Root Administrator
I'm seeing this on 2 servers:
CENTOS 6.4 x86_64 standard – WHM 54.0 (build 8)
CENTOS 5.11 i686 standard – WHM 54.0 (build 8)

It appears only to be happening to accounts that were migrated to these servers within the last couple weeks. Accounts that were already on these servers prior to to the migration don't seem to be affected.

when I run /scripts/mailperm <account> --verbose and it fixes the permissions.
Come back and check the next day and the permissions of maildirsize have returned to the bad settings.
Plenty of mail comes into the accounts without changing the permissions, so not sure what triggers the change.

Clues:
After migrating the accounts I rsync'd the mail dirs for the moved accounts a few times until DNS propagated.
Cpanel updates have been done since the migrations.
Converted the mail from courier to dovecot on both servers since the migration.
 

zackw

Active Member
Sep 30, 2010
30
0
56
I just had to fix this error too.

Watching this thread for updates and see if the permissions return to previous values automatically for me too.
 

luxhosting

Member
Sep 3, 2010
13
0
51
Hello,

we have again this issue, on 2 actual servers : CENTOS 5.11 x86_64 vmware – cpanel3 WHM 54.0 (build 12)
What do we have to to to fix this ?
Thanks and best regards
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463