Skip to main content

Hermes SEG Bulk Recipient Import and Delete

Currently, Hermes SEG provides a way to only bulk import Internal Recipients through the Administration Console Web GUI by  using Active Directory Integration if you have a Hermes SEG Pro license. However, if Active Directory Integration is not available or possible, there is no way to bulk import or delete Internal recipients through the Administration Console Web GUI. For those cases, we are providing a command line bash script that will enable you to bulk import and bulk delete Internal Recipients that are stored in a .csv file.

As an added benefit, if your mailboxes are stored on a Microsoft Exchange server, we are also providing a export_exchange_mailboxes.ps1 powershell script that will allow you to export all your Exchange mailboxes into a .csv file that you can use to import into Hermes SEG.

Download Required Files

In a Hermes SEG root command console run the following command to download the required files to a directory of your choice:

wget https://raw.githubusercontent.com/deeztek/Hermes-Secure-Email-Gateway/master/dirstructure/opt/hermes/scripts/hermes_bulk_import_delete_recipients.sh \
wget https://raw.githubusercontent.com/deeztek/Hermes-Secure-Email-Gateway/master/dirstructure/opt/hermes/scripts/insert.sql \
wget https://raw.githubusercontent.com/deeztek/Hermes-Secure-Email-Gateway/master/dirstructure/opt/hermes/scripts/delete.sql

After running the command above, you will end up with the following files:

  • hermes_bulk_import_delete_recipients.sh - Bulk Import/Delete Bash Script
  • insert.sql - Bulk Import .sql file that hermes_bulk_import_delete_recipients.sh script uses to clean up the imported data and update additional fields in the database for the bulk import to succeed.
  • delete.sql - Bulk Delete .sql file that hermes_bulk_import_delete_recipients.sh script uses to clean up the imported data and update additional fields in the database for the bulk delete to succeed.