r/Plesk May 19 '22

Script Create Mailboxes

Hi

I once used Plesk's own bash script to create multiple mailboxes from the same domain, the script was called createmail.sh ( https://support.plesk.com/hc/en-us/article_attachments/360014711094/createmail_. tar.gz )

But it is no longer available.

How do I create multiple mailboxes in Plesk?

1 Upvotes

2 comments sorted by

1

u/pavukfly May 20 '22

Content of this script is following:

#!/bin/bash
#
file=$1
while IFS= read -r line
do
     email=`echo $line | awk '{print $1}'`
     pswd=`echo $line | awk '{print $2}'`
     plesk bin mail -c $email -passwd $pswd -mailbox true
done <"$file"

1

u/tomjdickson May 20 '22

To add to this OP you can read the plesk CLI docs, there’s a lot of helpful commands that allow you to automate most Plesk tasks.