The OpenSRS bulk tools let you create, modify, or delete many email users in a single operation, instead of editing accounts one at a time. You can run bulk actions from the Reseller Control Panel or the Mail Administration Console (MAC). This article covers both, plus the syntax and examples you need to format your data correctly.
About bulk actions
Bulk tools support four types of jobs in the Control Panel: Migrate Users, Bulk Add, Bulk Modify, and Bulk Delete. The MAC supports Add, Modify, and Delete. Each job processes a delimited list of accounts in the format you specify.
Before you begin
- Confirm the target domain already exists. If not, see Create a New Domain for Email Accounts.
- Prepare your user data in a delimited list that matches the expected syntax for the action.
- For bulk migrate jobs, gather source server hostname, protocol, ports, and a username/password list.
- Keep batches reasonable. For migrations, do no more than 500 mailboxes per batch.
- Decide whether you want to use the Reseller Control Panel or the MAC.
Step 1: Run a bulk job in the Reseller Control Panel
- In the Email section of the Control Panel, click the Email Domains tab.
- In the Quick filter text box, enter all or part of the domain name, then click Search.
- Click the domain you want to edit, then click the Bulk Tools tab.
- Click the button for the action you want: Migrate Users, Bulk Add, Bulk Modify, or Bulk Delete.
- Complete the relevant fields and click Submit.
Migrate Users
- Job Name — a unique job name. If blank, a numeric name is generated.
- Server Hostname — the hostname or IP address you are migrating mail from.
- Server Protocol — mail retrieval protocol. Auto migrates the Inbox over POP3 and other folders over IMAP4. Choose Auto if you have POP users. For best speed, run POP3 users in one Auto job and IMAP users in another IMAP4 job.
- Server Ports — ports to connect on. For Auto, the ports are POP3, POP3s, IMAP4, and IMAP4s. Set to 0 to disable a protocol. Click the plus sign to add ports.
- Folders to Skip — folders to ignore during migration. Does not apply to POP3 users.
- Translate Folder Name — source and destination folder names if different.
- List of users and passwords — format: source_username,source_password[,local_username]. Use a non-comma delimiter if usernames contain commas.
Bulk Add
Enter account data in the Delimited list field using the format:
username,type,password[,reject_spam,name,workgroup,forward_recipients,aliases]
- username — the email address to create.
- type — mailbox, forward, or filter.
- password — initial password. Optionally prefix with {MD5} or {CRYPT} if pre-encrypted.
- reject_spam — true rejects spam outright instead of quarantining.
- name — first and last name.
- workgroup — the workgroup to assign.
- forward_recipients — addresses mail is forwarded to.
- aliases — alias addresses.
Bulk Modify
- Default attributes and values — comma-delimited list of attribute changes that apply to all users (for example, language, spamtag, brand).
- User attributes and values — per-user changes (password, type, name, forward_recipients, aliases, allow, block), one user per line.
Bulk Delete
- List of users — one username per line for accounts to delete.
Step 2: Run a bulk job in the MAC
- Log in to the Mail Administration Console (MAC).
- In the navigation pane, under Tools, click Bulk Action.
- From the drop-down list, choose Add, Delete, or Modify.
- Enter the account information in the text area. The required syntax is shown on screen.
- Click Process.
Note: Account-specific data such as allow and block lists must still be added through the Users section.
MAC syntax by account type
One line per account. Brackets indicate optional fields.
Account type | Syntax |
|---|---|
Mailbox | user@domain.tld,mailbox,[password],[T/F (reject spam)],[name],workgroup,[forward_email1:forward_email2...],[alias1:alias2...] |
Filter | user@domain.tld,filter,[password],[T/F (reject spam)],[name],workgroup,null,[alias1:alias2...] |
Forward | user@domain.tld,forward,[password],null,[name],workgroup,forward_email1[:forward_email2...],[alias1:alias2...] |
Alias | user@domain.tld,alias,null,null,null,null,null,workgroup,alias_target_email |
Field definitions
- user@domain.tld — the email address you want to create.
- mailbox_type — mailbox, forward, or filter.
- password — initial password. Can be prefixed with {MD5} or {CRYPT}.
- T/F (reject spam) — T rejects spam instead of quarantining.
- name — first and last name.
- workgroup — for grouping users when you want sub-admins to manage subsets.
- forward_email / alias target email — matches the mailbox type.
Examples
fred@domain.tld,mailbox,fredpass123,F,Freddie,Jones,staff,
franz@domain.tld,mailbox,secret123,F,T,Franz,Kafka,staff,franz@domain2.tld
nospam@domain.tld,mailbox,pass123,T,Spam,Bouncer,staff,
filter1@domain.tld,filter,luggage1234,F,Normal,Filteronly,staff,
filter2@domain.tld,mailbox,porsche,T,NoSpam,Filteronly,staff,
kafka@domain.tld,forward,,,,staff,franz@domain2.tld
burt@domain.tld,mailbox,secret123,F,Burt Bacharat,staff,,burt@domain2.tld:bbacharat@domain.tld
fred.jones@domain.tld,alias,,,,,staff,fred@domain.tld
fred.jones@domain2.tld,alias,,,,,staff,fred@domain.tldNext steps
- Run a migration job — use bulk tools to pull mail from a source server. See How to Use the Email Migration Tool.
- Plan a full migration — map out preparation, pre-migration, and post-migration steps. See Migrate to the OpenSRS Email Service.
- Create accounts manually instead — for small numbers, create users one at a time. See Creating Mailbox Accounts.
Questions? Contact OpenSRS Support.
How helpful was this article?
Thanks for your feedback!
Do you still need help? If so please submit a request here.