• 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.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Cannot remove mail accounts: mailmng failed: Some errors occured. See log for details

G

GustavoO

Guest
Hi!

I'm trying to remove mail accounts or even a domain and i'm always getting this error:

Code:
ERROR: PleskUtilException

     
mailmng failed: Some errors occured. See log for details

--------------------------------------------------------------------------------

0: class.MailManager.php:242
MailManager::execWithException(string 'smart_exec', string 'mailmng', array, array, string 'lst')
1: class.MailManager.php:274
MailManager->callMailManager(string 'remove-mailname', array)
2: class.MailManager.php:354
MailManager->removeMailname(string 'viewprofissionais.com.br', string 'lola')
3: cmd_mail.php3:1357
mn_del(string '1035')
4: class.MailNamesList.php:597
MailNamesList->remove(array)
5: mail_names_remove.php:55

I've tried this:

[user@host dir]# /usr/local/psa/admin/sbin/mchk --with-spam
==> Checking for: mail_spam_restore... ok
==> Checking for: mailsrv_conf_init... ok
==> Checking for: mail_mailbox_restore... ok
==> Checking for: mailsrv_entities_dump... ok
==> Checking for: mail_admin_aliases... fail
==> Checking for: mail_auth_dump... ok
==> Checking for: mailman_lists_dump... ok
==> Checking for: mail_responder_restore... ok
==> Checking for: mail_drweb_restore...

Then i get this error, as seen above:

Code:
==> Checking for: mail_admin_aliases... fail

Well, it still not letting me remove mail accounts, the error persists.

Please, i need some assistance...

Thanks in advance,
Gustavo.
 
This is the error i get:

ERROR: SpamFilterFatalException
object ID is invalid

0: SpamFilter.php:462
SpamFilter->setError_(string 'object ID is invalid')
1: class.cObject.php:399
cObject->delete()
2: SpamFilter.php:401
SpamFilter->delete()
3: MailName.php:720
Mailname->_onMailNameDelete()
4: MailName.php:1075
Mailname->delete()
5: cuMail.php:920
cuMail->_remove(string '[email protected]')
6: cuMail.php:896
cuMail->cmdRemove(string '[email protected]')
7: cuMail.php:509
cuMail->execute()
8: mail.php:27
PHP Warning: Releasing semaphore 29 in request cleanup in Unknown on line 0
 
Can someone help me please, it's urgent. I don't know where to run...

Thanks!
 
Try running psa/admin/sbin/mchk – this worked for me. Don't worry… this script may run a long time (it tooks 3 hours on my DELL PowerEdge R200, Quad Core Xeon 3GHz, 8GB RAM). Maybe run it from a `screen` session so that you can get back to it later for checking its progress.
 
Sorry, I mixed up threads. The mchk command did not work for me here, either.
I just helped when nobody could send/receive emails because some files were missing…

The problem persists for me, too. And I tried doing it from CLI:

plesk:/opt/psa/bin# ./mail --remove [email protected]
ERROR: SpamFilterFatalException
object ID is invalid

0: SpamFilter.php:462
SpamFilter->setError_(string 'object ID is invalid')
1: class.cObject.php:399
cObject->delete()
2: SpamFilter.php:401
SpamFilter->delete()
3: MailName.php:720
Mailname->_onMailNameDelete()
4: MailName.php:1075
Mailname->delete()
5: cuMail.php:920
cuMail->_remove(string '[email protected]')
6: cuMail.php:896
cuMail->cmdRemove(string '[email protected]')
7: cuMail.php:509
cuMail->execute()
8: mail.php:27
PHP Warning: Releasing semaphore 29 in request cleanup in Unknown on line 0
 
I escalated this issue to Parallels. Currently there's someone from Parallels logged into one of our server and running "mchk --with-spam". Maybe you try this, too.

root pts/0 support.sw-soft. 01:27 4:31m 1.98s 0.00s /bin/sh /usr/local/psa/admin/sbin/mchk --with-spam

I'll tell you the solution when the support gets back to me.
 
That's what the support replied:

I have found the following errors coming to the log:
# less /var/log/sw-cp-server/error_log

System error 2: No such file or directory
/opt/psa/admin/bin/drwebmng[8045]: Unable to get string from file:
/opt/psa/handlers/info/20-drweb-zxtL7O/hook
drwebmng: Unable to open file /opt/psa/handlers/info/20-drweb-zxtL7O/hook: No
such
file or directory

System error 2: No such file or directory
/opt/psa/admin/bin/drwebmng[8045]: Unable to get string from file:
/opt/psa/handlers/info/20-drweb-zxtL7O/hook
drwebmng: Unable to open file /opt/psa/handlers/info/20-drweb-zxtL7O/hook: No
such
file or directory

System error 2: No such file or directory
/opt/psa/admin/bin/drwebmng[8045]: Unable to get string from file:
/opt/psa/handlers/info/20-drweb-zxtL7O/hook
drwebmng: Unable to open file /opt/psa/handlers/info/20-drweb-zxtL7O/hook: No
such
file or directory

System error 2: No such file or directory
/opt/psa/admin/bin/drwebmng[8045]: Unable to get string from file:
/opt/psa/handlers/info/20-drweb-zxtL7O/hook
mailmng: /usr/lib/plesk-9.0/handlers-tmpfs execution failed:
/usr/lib/plesk-9.0/handlers-tmpfs: line 39: rsync: command not found
mailmng: /usr/lib/plesk-9.0/handlers-tmpfs execution failed:
/usr/lib/plesk-9.0/handlers-tmpfs: line 39: rsync: command not found
mailmng: /usr/lib/plesk-9.0/handlers-tmpfs execution failed:
/usr/lib/plesk-9.0/handlers-tmpfs: line 39: rsync: command not found
mailmng: /usr/lib/plesk-9.0/handlers-tmpfs execution failed:
/usr/lib/plesk-9.0/handlers-tmpfs: line 39: rsync: command not found
mailmng: /usr/lib/plesk-9.0/handlers-tmpfs execution failed:
/usr/lib/plesk-9.0/handlers-tmpfs: line 39: rsync: command not found

Such errors indicated mail handlres corruption. To eliminate the issue, I have

recreated mail handlers according to instructions provided in the article:
http://kb.odin.com/en/6410

1. Stop mail service.
~# /usr/local/psa/admin/sbin/mailmng --stop-service

2. Backup old handlers
~# mkdir /root/temp
~# cp -a /usr/local/psa/handlers/before-* /root/temp/
~# cp -a /usr/local/psa/handlers/info /root/temp/

3. Delete all mail handlers:
~# rm -rf /usr/local/psa/handlers/before-*/*
~# rm -rf /usr/local/psa/handlers/info/*

4. Run utility mchk to recreate mail handlers:
~# /usr/local/psa/admin/sbin/mchk --with-spam

5. Start mail service:
~# /usr/local/psa/admin/sbin/mailmng --start-service



Unfortunately… after the "support action" I cannot log into plesk anymore and using Spamdyke does not work anymore. But this seems to be another (new) problem… :-/
 
Well. Nice to see you've solved this issue and sorry to know that you got another problem.

I've tried the mchk --with-spam before (as you can see in the posts below) and it didnt work. ;(

Now, after what you just stated, i'm a bit afraid to try this solution in your last post... hehe

Please let me know if everything gets okay to you.

Also, did you pay for the support to login in your server?



Thanks,
Gustavo.
 
The support resolved my issue with removing mail accounts.

The other issues which seemed to be introduced by the support were solved too. Spamdyke had to be reconfigured (smtp_psa, smtps_psa were overwritten) and my ip had to be entered to the lists of accepted ips for administrative login (don't know why it was removed, but nevermind - now it works).

Yes, we pay for the support. We can escalate problems to our provider who has an platinum support contract (via United Internet AG).
 
I'm having trouble to remove domains and mail accounts.

When i see the "sw-cp-server/error_log" it gives me this:

Code:
# more /var/log/sw-cp-server/error_log


System error 2: No such file or directory
/usr/local/psa/admin/bin/drwebmng[3024]: Unable to get string from file: /usr/lo
cal/psa/handlers/info/20-drweb-axBFWQ/hook
drwebmng: Unable to open file /usr/local/psa/handlers/info/20-drweb-axBFWQ/hook:
 No such file or directory

So, i tried to solution in this kb: http://kb.odin.com/en/6410

The following command returns nothing:

# find /usr/local/psa/handlers/before-* -type f | while read h ; do [ ! -d /usr/local/psa/handlers/info/$(basename $h) ] && echo $h ; done

As seen under:

Code:
# find /usr/local/psa/handlers/before-* -type f | while read h ; do [ ! -d /usr/local/psa/handlers/info/$(basename $h) ] && echo $h  ; done
#

Tried mchk --with-spam and everything but couldnt solve my problem!

I didn't try yet to remove the handlers and run mchk because i'm a bit afraid to do that cause i've heard that some people got some problems as result of this procedure.

I will wait for some advices...

Thanks!
 
Solved!

Hello! Thanks for the help!

I've solved this issue by removing the dir that was faulty.

*** remember to backup the dir you're supposed to remove!

Stop services:
1) /usr/local/psa/admin/sbin/mailmng --stop-service

Removing faulty dir (i recommend to back it up):
2) rm -rf /usr/local/psa/handlers/info/20-drweb-axBFWQ/

Then i've rebuild the handlers:
3) /usr/local/psa/admin/sbin/mchk --with-spam

Restarted the services:
4) /usr/local/psa/admin/sbin/mailmng --start-service

Now everything works okay! :)

Thanks Yves Vogl and everyone else for the help,
Gustavo.
 
black list

I had the same problem. It solved when I trash the black list domains from spam assassin black list.
 
Hello! Thanks for the help!

I've solved this issue by removing the dir that was faulty.

*** remember to backup the dir you're supposed to remove!

Stop services:
1) /usr/local/psa/admin/sbin/mailmng --stop-service

Removing faulty dir (i recommend to back it up):
2) rm -rf /usr/local/psa/handlers/info/20-drweb-axBFWQ/

Then i've rebuild the handlers:
3) /usr/local/psa/admin/sbin/mchk --with-spam

Restarted the services:
4) /usr/local/psa/admin/sbin/mailmng --start-service

Now everything works okay! :)

Thanks Yves Vogl and everyone else for the help,
Gustavo.

Be careful with "/usr/local/psa/admin/sbin/mchk --with-spam" - I've found it sometimes corrupts /var/qmail/control/rcpthosts and /var/qmail/control/virtualdomains - good idea to back those up first.
 
Back
Top