1

Topic: Bulk import of email addresses in sql environment.

Hello iRedMail ! is there a better way or a script to bulk import email accounts from csv or txt file ?
Thank you so much !
== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): latest
- Deployed with iRedMail Easy or the downloadable installer? downlodable installer
- Linux/BSD distribution name and version: Debian 10
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MySQL
- Web server (Apache or Nginx):Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Bulk import of email addresses in sql environment.

Does this help?
https://docs.iredmail.org/sql.create.mail.user.html

You can write a simple shell script to extract info from csv file, then call this script to add the user.

3

Re: Bulk import of email addresses in sql environment.

You can try my create-new-user-bulk.sh script, you first set your preferred defaults in the script variables and then create a csv for all of the user accounts you want to create. This will generate the commands for you to run on your mail server. Make sure to read the comments in the script.

https://github.com/jeekkd/iRedMail-scripts

4

Re: Bulk import of email addresses in sql environment.

daulton wrote:

You can try my create-new-user-bulk.sh script, you first set your preferred defaults in the script variables and then create a csv for all of the user accounts you want to create. This will generate the commands for you to run on your mail server. Make sure to read the comments in the script.

https://github.com/jeekkd/iRedMail-scripts

Thanks for sharing. smile