• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Batch Email Import for Plesk

A

AronF

Guest
I've got Plesk 9.2 installed on Windows Server 2008 using Mail Enable Enterprise as the Email server. Everything is working fine. I can go in for any domain and hand key as many email addresses as I want but I've got literally hundreds of email addresses to create.

Does anybody know how I can automate the creation of email addresses through plesk?

I still want Plesk to be aware of the new addresses as the owners of each email account may want to log in to Plesk and adjust SPAM/AV settings.

I've done several searches on either a command line console or some other scripting method for getting what I need done and have not had any success.
 
My Solution

Here's the powershell script that I ended up with, for anybody else that might have this same question or might wonder what the status of my query is:

Using the following CLI resource for Plesk 9.2, I was able to construct this PowerShell script to create the desired email accounts:

foreach ($email in Get-Content "C:\your email list.csv") { $eml = $email.split(", ")[0]; $pass = $email.split(", ")[1]; cmd.exe /c "mail --create $eml -passwd $pass -cp-access true -mailbox true -antivirus inout"; cmd.exe /c "spamassassin.exe -u $eml -status true"; }

The script reads in a .csv file and does some basic parsing to grab the appropriate email/password values and then enables several options including spam filtering on the inbox.

I hope this helps somebody!

--Aron
 
Back
Top