Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Mail tab for a domain is missing from Plesk: PleskFatalException  (Read 2385 times)

0 Members and 1 Guest are viewing this topic.

joseletk

  • Guest
Mail tab for a domain is missing from Plesk: PleskFatalException: domain is not set!

Resolution

1. Log into Plesk UI.

2. Open Plesk > Tools & Settings > Mail > Mail Server Settings and ensure that option Enable mail management functions is on.

Or activate mail service for the domain by command-line while logged in to the server via SSH as follows:

Code: [Select]
# /usr/local/psa/bin/mail --update-service example.comd -status enabled -ignore-nonexistent-options
# /usr/local/psa/bin/mail --on example.com -ignore-nonexistent-options
# /usr/local/psa/bin/domain --info example.com | grep 'Mail service'
Mail service: On

If this did not help, use the steps below:

Automatic recovery for Linux:

1. Download this script for Linux.

Code: [Select]
# wget https://support.plesk.com/hc/article_attachments/115004385649/mail_restore_lin.zip
# unzip mail_restore_lin.zip

2. Make it executable:

Code: [Select]
# chmod +x ./mail_restore.sh
3. Run the script with a domain name as an argument:

Code: [Select]
# ./mail_restore.sh example.com
4. To restore several domains, execute the command:

Code: [Select]
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa -sNe "select d.name from domains d join DomainServices ds on d.id=ds.dom_id where dom_id not in (select dom_id from DomainServices where type='mail')" > domain_list.txt
And then run the script:

Code: [Select]
# while read dname; do /root/mail_restore.sh $dname; done < domain_list.txt
====================================================================