Need to create 400+ emails

Hi there, is there any import function in hestiacp to make bulk email accounts at once?

Hi,

The only import function that I know is v-import-cpanel to import all data from a cpanel backup but seems is not what you are looking for.

If you have all the data in a text file you can create a script to add all of them using v-add-mail-account

Data that you will need in that file:

USER DOMAIN ACCOUNT PASSWORD [QUOTA]

1 Like

No,

But I can be done via bash or even php if you have a file. But it depends on how it looks …

am not that technical tho, but after creating the text file

i will need to run the command like this?
v-add-mail-account file.txt

Thanks i figured it out and done

1 Like

That won’t work …

If the file looks like:

user,test.com,jaap,123456ABCD
user,test.com,jaap2,123456ABCD

Then:

#/bin/bash

while IFS="," read -r user domain account password
do
   v-add-mail-account "$user" "$domain" "$account" "$password"
done < email.txt

You can also just create a file containing $account and $password and then hard code the missing values…

But without knowing how the text file looks like I have no idea how to do it exactly…

1 Like

I didn’t know hestia supports import for Cpanel. Should add it to the documentation for restoring.

v-import-cpanel

Source

Import Cpanel backup to a new user

Options: BACKUP [MX]

Examples:

bash

v-import-cpanel /backup/backup.tar.gz yes

Based on sk-import-cpanel-backup-to-vestacp Credits: Maks Usmanov (skamasle) and contributors: Thanks to Contributors to Skamasle/sk-import-cpanel-backup-to-vestacp · GitHub

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.