1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Domain Creation Question

Discussion in 'Plesk for Linux - 8.x and Older' started by gcomm, Sep 16, 2008.

  1. gcomm

    gcomm Guest

    0
     
    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
     
  2. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    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.
     
  3. gcomm

    gcomm Guest

    0
     
    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.
     
  4. ziba@

    ziba@ Guest

    0
     
    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.
     
Loading...