If you like DNray Forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...

 

Tips and Tricks for Newbies

Started by Slip, Jul 15, 2022, 12:48 AM

Previous topic - Next topic

SlipTopic starter

I am new to hosting and have a lot of questions. I began by asking myself about automation, but despite reading extensively, I couldn't find any information on the topic. To explore this further, I downloaded and installed a trial version of Plesk.

Although it was easy to navigate, I was unsure whether it was possible to create accounts automatically, for example, for email. I understand that currently, it can only be done manually through the panel, but I am hoping to find a solution for automating the process. Can you point me in the right direction to achieve this? Thank you.
  •  


lalmazl

Technical support is helpful when dealing with questions related to "what and how". However, if something is broken, it's important to escalate the issue to ensure it receives attention.

Although catching and fixing bugs at the cost of users is common practice, it becomes particularly perverse when it comes to parallelism. It's possible to adjust to the role of a permanent beta tester, but this can be unpleasant when servers are being used in production and unexpected issues arise after an update. Paying $100 or more for support, only to have developers fix problems caused by their own code, is unacceptable.
  •  

kpripper

As a web server administrator logging in to Plesk for the first time, you will be prompted to fill out various forms to personalize your information and initially configure Plesk. Here are the steps to follow:

- Accept the Plesk License Agreement.
- Complete the initial setup by entering the full name of the web server host, selecting the default IP address, dividing IP addresses into shared and dedicated, and creating a new password for the Plesk administrator.
- Fill out a form with your personal information.

- Choose between two modes of the Plesk interface: Power User mode, for working as a web administrator managing clients' sites, or Service Provider mode, for working as a virtual web hosting provider selling hosting to clients who manage their own sites.
- Install the Plesk license key, which can be downloaded as a .ZIP archive, .XML file, or activated with a code.
- If you have chosen Power User mode, set up your first subscription by specifying the domain name, IP address, and system user name and password.
  •  

olgabelous282

Tell me please, and if you have downloaded the license key in the wrong format. Is it possible to fix this to continue? Go back to the beginning and download again?
  •  

Odkazylevne

Plesk is a pretty nifty control panel, ain't it? Easy to navigate, all them shiny buttons and whatnot. But you're right, creating email accounts manually ain't exactly the height of efficiency, especially when you're talkin' 'bout scalability and all that jazz.

Now, Plesk does have this thing called "Customer & Reseller Management" where you can automate some tasks, like suspending or unsuspending accounts, but it ain't got nothin' built-in for automating email account creation, at least not that I know of. But don't you worry, there's always a way around these things.

You see, Plesk's got this thing called "API". It's like a secret door that lets you talk to Plesk in a language it understands, and with a bit of tinkerin', you can make it do your bidding. You can use this API to create scripts that automate all sorts of tasks, email account creation included.

Now, I ain't no programmer, but I know a few tricks. Here's a real basic example of how you might use the Plesk API to create an email account. You'd be usin' something called cURL, which is like a little command-line tool that helps you talk to servers.

curl -X POST -u "plesk_username:plesk_password" -H "Content-Type: application/json" -d '{"login":"new_email_login","password":"new_email_password","name":"New Email Name","mailbox_quota":0,"mailbox_size":0,"domain":"your_domain.tld"}' https://your_server_ip:8443/enterprise/mail/accounts

In this here example, you'd replace "plesk_username" and "plesk_password" with your Plesk admin credentials, and "your_server_ip" with the IP address of your server. The JSON data is where you specify the email login, password, name, and domain you want to create.

But remember, this is just a simple example. If you're planning on doin' this for real, you'll want to wrap it up in a script, add some error checkin', and maybe even use some sort of secure authentication method instead of just shovin' your password into the URL like that.

And if you're feelin' a bit overwhelmed, don't you worry. There's plenty of resources out there to help you learn the ropes. The Plesk dоcumentation is a good place to start, and there's always the good ol' interwebs where you can find forums and tutorials galore.
Automation ain't always easy, but with a bit of tinkerin' and a bit of learnin', you'll be creatin' email accounts left and right in no time.
  •  

aVeniLeadiaMex

Automating email account creation in Plesk requires a good understanding of the Plesk API and the XML-RPC protocol. You'll need to use a programming language like PHP or Python to interact with the API and create scripts that automate tasks. One approach is to use the Plesk API to create a new email account, then use the XML-RPC protocol to configure the account settings.
You can also use Plesk's built-in automation features, such as the "Scheduled Tasks" feature, to automate tasks like creating email accounts on a schedule.
However, this requires a good understanding of the Plesk API and XML-RPC protocol, as well as programming skills.
  •  


If you like DNray forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...