Home

Awesome

iRedMail version compatibility1.4.0

Administrative scripts for iRedMail, useful if you do not use iRedAdmin, or you do not have iRedAdmin Pro.

Read the examples and usage in each script to understand the parameters to use. Each script will generate SQL for you to use. These scripts are for a iRedMail installation with an SQL back end, specifically PostgreSQL.

There are scripts so far to do the following administrative functions:

CategoryScriptWhat it does
User accounts
create-new-user.shCreates a new user, with an optional feature of created users being a part of default aliases
create-new-user-bulk.shCreates new users from a CSV file, with an optional feature of created users being a part of default aliases
add-domain-admin.shMakes an existing user into a domain admin, optionally can become a global admin - read the prompt
revoke-domain-admin.shRevokes a users domain administrator permission
remove-domain-admin.shRemove a users entry entirely from the domain_admins table
remove-user.shDelete a user
update-account-password.shUpdate a users password
disable-user.shDe-activate a user account
enable-user.shRe-enables a disabled user account
list-active-accounts.shList active user accounts
list-inactive-accounts.shList inactive user accounts
list-all-but-regular-accounts.shLists all from the forwardings table that are not just regular accounts
enable-pop3-for-user.shEnables pop3 for a user account, enables usage of this protocol
enable-pop3-for-domain.shEnables pop3 for all accounts on a given domain
enable-imap-for-user.shEnables IMAP for a user account, enables usage of this protocol
disable-pop3-for-user.shDisables pop3 for a user account, prevents usage of this protocol
disable-pop3-for-domain.shDisables pop3 for all accounts on a given domain
disable-imap-for-user.shDisables IMAP for a user account, prevents usage of this protocol
increase-mailbox-quota.shIncreases the mail box quota size for a given user
increase-all-mailbox-quota.shIncreases the mail box quota size for all users regardless of domain, or for a specific domain
Aliases
create-alias.shCreate an alias
add-user-to-alias.shAdd a user to an alias. Multiple users can be added to the same alias, use the script as many times as necessary.
create-alias-policy.shCreates or updates an access policy for an alias to restrict which senders are allowed to send email to this mail alias
remove-alias.shRemove a given alias
set-alias-active.shSet an alias as active
set-alias-inactive.shSet an alias as inactive
is-address-an-alias.shCheck if a given email address is an alias
add-alias-domain.shAdd an alias domain
remove-alias-domain.shRemove an alias domain
Forwarding
list-forwarding.shList any configured forwards
remove-forwarding.shDeletes mail forwarding from a given address to another entered address
remove-whole-forward.shRemoves the whole forwarding address and all forwards associated to it
add-mail-forward.shForward mail from one user account to another
is-forward-to.shList if any addresses are set to forward to a given address
is-forward-from.shList if any addresses are set to forward fromm a given address
disable-mail-forwarding.shDisables mail forwarding from a given address to another entered address, but do not delete the configured forward
Domain
add-domain.shCreates a new domain in the database, after which you can begin creating user accounts in the new domain
change-domain.shChange domain name of an existing domain and associated mail accounts
remove-domain.shRemoves a domain from the database
update-domain-quota.shUpdates the domain wide mailbox quota
update-all-domain-quota.shUpdates all existing domains with a new default mailbox quota
enable-domain.shEnables a domain in the database, must exist already
disable-domain.shDisables a domain in the database
Misc
list-top-10-mailbox.shList the top 10 mailboxes by size
list-largest-to-smallest-mailbox.shList mailbox size from largest to smallest
update-storagenode.shMail is located at /var/vmail/vmail1 by default, this script helps change the database value of 'vmail1' to a new value
update-storagebasedirectory.shThe base directory for mail is located at /var/vmail by default, this script helps change the database value of '/var/vmail' to a new value