• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Domain Creation Question

G

gcomm

Guest
Hi,

When a domain is created, it automatically creates that domain on the C-Mail Server, DNS Servers etc. I would like plesk to only add the domain to the servers that the domain will utilise.

I have created a client that needs to use the website hosting component of Plesk only. I have set the limits to 0 mailboxes and no access to DNS zone management, but it still creates the domain on the mail server and the DNS Servers.

I know I can disable DNS and Mail once the domain has been created, but this can compound to a considerable administrative overhead if the client has many domains.

Is there a way to stop it from automatically creating the domain on ALL the servers?

Thanks,

Jay
 
there is no harm in having it created if they cant use it - and if you dont use the services (ie dns and mail dont run on the box) then its not really important anyways.
 
there is no harm in having it created if they cant use it - and if you dont use the services (ie dns and mail dont run on the box) then its not really important anyways.

The problem is, if the domain is added to the mail server but the client is not hosting their mail there and a message is sent through to mail server's smtp service to the domain, then the message will bounce as the domain will be listed in the recipient hosts without any email addresses created. same thing with dns...

unfortunately we need dns and mail for other clients hosted on the same box..

thanks anyway.
 
Hi,

In Plesk there is no way to specify whether to enable/disable mail and dns for domain during creation process - these services are always enabled by default.

You can use Plesk even handler mechanism and bind it to 'Domain created' event.
http://download1.swsoft.com/Plesk/Plesk8.6/Doc/en-US/plesk-8.6-unix-administrators-guide/17358.htm

You will need to write a script that will accept domain name as argument and will do the following:

1. Check if this domain belongs to the client that needs mail/dns to be disabled by default. You can get client login from database:
mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -Ns -e"select login from clients where id=(select cl_id from domains where name='DOMAIN_NAME');"

2. If this domain belongs to the client that needs mail/dns to be disabled you will need to send API query to CMAIL/CNDS server. This API query should disable mail/dns service for this domain. API reference can be found here:
http://swdn.swsoft.com/en/library/plesk/
http://download1.parallels.com/Plesk/Plesk8.6/Doc/en-US/plesk-8.6-api-rpc/index.htm

In case mail and dns is hosted on Plesk server itself and not on cmail/cdns server then instead of sending API query you can simply call Plesk CLI utility to disable mail/dns for this domain:
http://download1.parallels.com/Plesk/Plesk8.6/Doc/en-US/plesk-8.6-unix-cli/index.htm

hope this helps.
 
Back
Top