• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Internal error while deleting Email

A

afterXleep

Guest
When deleting a mailbox in a domain I get "Internal Error" message and the mailbox is not deleted.

Note that page gets disabled after that and a refresh is needed.

Logs wont say much.

Any ideas?
 

Attachments

  • 366868784162.png
    366868784162.png
    101.7 KB · Views: 10
Any errors in /var/log/sw-cp-server/error_log and /usr/local/psa/admin/logs/panel.log ?

Did you try remove email with corresponding CLI utility? What sort of output there?
 
Hi Igor.

I tried to disable the mailbox and the delete the account, but still unsucsessfully. Here are the last log on both files

This is the last error from the error_log:

Code:
2012-08-17 01:53:18: (mod_fastcgi.c.2582) FastCGI-stderr: PHP Fatal error:  Call to undefined method mail_Facade::redirectOnOff() in /usr/local/psa/admin/plib/mail/AbstractFacade.php on line 197

And this is the error from panel_log

Code:
2012-08-16T23:49:25-04:00 ERR (3): Unable to create mailname object: Unable create account with ID "34"

Regarding the CLI, I did not. Actually not familiar with it.

Thanks,

Daniel
 
/usr/local/psa/bin/mail --help

Usage: mail command <mail_name> [options]
Available commands:
--create or -c <mail>@<domain> creates mail account
--update or -u <mail>@<domain> updates mail account parameters
--remove or -r <mail>@<domain> removes mail account
--info or -i <mail>@<domain> retrieves mail account information
--on <domain> enables mail service for domain
--off <domain> disables mail service for domain

and so on ...

Thus to remove and email, you run

/usr/local/psa/bin/mail --remove [email protected]
 
Thank you, it was removed correctly via CLI. However my customer wont have access to the command line. Any ideas why the Internal Error in the panel?

Daniel
 
I had the same issue. Unable to delete using CP and unable to remove subscription using /opt/psa/bin/subscription --remove. Removing broken addresses using /opt/psa/bin/mail -r <email address> works, and I'm then able to remove the subscroiption as well.

This seems like a bug to me? Why would the 'subscription' tool fail where the 'mail' tool works okay?
 
Usually, Plesk has the issue of deleting, renaming, or updating an email when that email has a lot of emails, GB in emails. That happens sometimes because the email was hacked and you have thousands of emails in queue. Ok, whatever the reason this is the way to delete the email, BE AWARE that DO NOT DO THIS if you don't have experience with databases and Linux administration. Because if you don't follow the instructions, you can crash the complete mail server, even the COMPLETE server.

Login SSH with the root user
cd /var/qmail/mailnames
ls -la

you will get the list of directories of the emails, ex: if the mail is "[email protected]" the folder name will be "user1"
let's delete the folder with this command:
DOUBLE CHECK THE FOLDER NAME IS THE ONE THAT IS RELATED TO THE EMAIL YOU WANT TO DELETE
rm -rf user1

this process can take some time depending on the mailbox size.
Once finished we have to delete the email from the database. for this type this command:

plesk db
use psa;

Now we have to locate the ID of the email account, type:

select * from mail;

You will get the list of the emails created in the server, so locate the ID of the email you want to delete. ex: 25

to delete that email record type this (I'll use the ID 25 for example) and REPLACE the 25 with the ID of the email you want to delete:
DOUBLE-CHECK THAT THE ID IS THE CORRECT ONE
delete from email where id='25';

BINGO!! the email has been deleted from the server. Reload your Plesk panel and you won't see the email anymore. Therefore, you will be able to create that again.
 
Back
Top