• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    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. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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