diff --git a/management/mailconfig.py b/management/mailconfig.py index 55671468..1213c900 100644 --- a/management/mailconfig.py +++ b/management/mailconfig.py @@ -148,7 +148,7 @@ def get_mail_users_ex(env, with_archived=False): percent = '' try: dirsize_file = os.path.join(env['STORAGE_ROOT'], f'mail/mailboxes/{domain}/{user}/maildirsize') - with open(dirsize_file, 'r') as f: + with open(dirsize_file, encoding="utf-8") as f: box_quota = int(f.readline().split('S')[0]) for line in f.readlines(): (size, count) = line.split(' ')