• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

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