Symptoms
While attempting to access the webmail interface, you may see an error like the following.
Template::Exception:
[TYPE]=[undef]
[INFO]=[You do not have a user named "emailuser@domain.tld". at /usr/local/cpanel/Cpanel/API.pm line 261.
]
[TEXT]=[]
at cpanel.pl line 1126.
cpanel::cpanel::cptt_exectag("/usr/local/cpanel/base/frontend/paper_lantern/mail/webmailfor"..., 1) called at cpanel.pl line 4606
cpanel::cpanel::run_standard_mode() called at cpanel.pl line 930
cpanel::cpanel::script("cpanel::cpanel", "./frontend/paper_lantern/mail/webmailform.html.tt") called at cpanel.pl line 326
Description
The error occurs when the email account's mailbox is missing or has incorrect permissions or ownership.
Workaround
- Access the server's command line via SSH or "Terminal" in WHM.
- Verify that the email user's email folder existence, ownership, and permissions.
stat /home/$cpuser/mail/$domain.tld/$user
Please note that $cpuser, $domain.tld, and $user must be replaced with the cPanel username, domain name, and email username, respectively.- If the folder doesn't exist, use the
mkdir
command to create it.mkdir /home/$cpuser/mail/$domain.tld/$user
- If the folder is not owned by the cPanel user, use the
chown
command with the-R
option to change the ownership recursively.chown $cpuser. -R /home/$cpuser/mail/$domain.tld/$user
- If the permissions are not set to 751 (rwxr-x--x), run the mailperm script.
/usr/local/cpanel/scripts/mailperm $cpuser
- If the folder doesn't exist, use the