Bulk account creation

I need to add 100 or so mail accounts to a server. How??

If you’re transfering these from another server using a control panel supported by the importer then it’s easy. Just make a backup file and import it through NodeWorx.

If not, then you’re out of luck as I don’t believe the API supports the creation of just an email account so I don’t see how you could write a script to do what you want. This fare the API only supports creating and modifying SiteWorx accounts.

Guys, feel free to correct me if I’m wrong . . .

You can loop over the following command:

/home/vpopmail/bin/vadduser -q <quota> <user>@<domain> <email_pass>

After the loop is finished, you should run just once:
/home/interworx/bin/varpermsfix.pex --siteworx=<domain>

It won’t hurt if you run varpermsfix more than once, but varpermsfix fixes the permissions of all the mail directories, so it really only needs to be run once after all the email accounts have been created.

That should do the trick, but we haven’t tested it out.

Socheat

Where is there any command line documentation???

The title says it all.

Anyway thanks for your help. I will give it a try and let you know. Then it will be tested.

It’s coming.

Title says it all :wink:

“It’s coming”

I feel compelled to say there are only a handful of command line scripts in /home/interworx/bin that should be run directly by the user and, of these, most of them should only be run under abnormal circumstances.

goiworx.pex usage:

goiworx.pex

Only run this once when you are installing InterWorx. This script installs and validates the license, creates the iworx.ini, and initalizes the InterWorx databases. “Initialize” means installs a clean copy of the InterWorx databases. Never never never never never run goiworx on an already active box. Only in very, very, very rare instances should goiworx ever be run more than once, and it’s usually if the InterWorx installation failed. You have been warned. :stuck_out_tongue:

varpermsfix.pex usage:

varpermfix.pex --siteworx=<domain>

This will fix the permissions on the directories and files found in /home//var/. If you find that you’ve accidentally chmod’d or chown’d that directory with something weird, running this script will fix the permissions on it. Otherwise, this should never need to be run, but it doesn’t hurt anything if it is.

package.deactivate.pex usage:

package.deactivate.pex --domlist <domain>

This will delete the SiteWorx account associated with . The parameter --domlist is misleading, this script only takes one domain at a time. This does the exact same thing as clicking “Delete” in NodeWorx on the SiteWorx accounts page, except you don’t get any confirmation.

resetmasterpassword.pex usage:

resetmasterpassword.pex

If you forgot your master NodeWorx user password, run this command. It will allow you to change the password.

The other two relevant pex scripts are backup.pex and import.pex, and you can find documentation on those scripts here:

All other pex scripts should not be run directly by the user.

Thanks.
I only ask because the marketing says “Shell Admin Friendly”. I assumed from that statement that most tasks could be done from the command line rather than the web interface. I won’t be tempted to assume too much in the future. :wink:

“Shell Admin Friendly” means that Interworx doesn’t take over your box and that you can still do the normal day-to-day admin jobs through the Command Line.

Some control panels out there take over the box and mean that you have to do almost everything through the control panel itself. Interworx is extremely good in the regard that it bumbles along and doesn’t get in your way :smiley:

Well said, EverythingWeb.

To be more specific, our goal is for InterWorx is to work along with, or augment, the system, not take control of the server. So, you can edit config files from the command line, and InterWorx will reflect those changes in the interface (if we chose to show it in the interface that is). If we decided not to expose those particular config options in the NodeWorx interface, your changes to those options won’t get clobbered the next time you use the NodeWorx interface to update other settings. I hope that makes sense… :slight_smile:

Socheat

Fantastically put! :smiley: