Replaced references to sh within each script and changed the references to bash instead.

This commit is contained in:
Daulton Tetreault 2021-08-01 12:25:52 -05:00
parent cac5ad19a1
commit 3f3a58b4e7
47 changed files with 116 additions and 116 deletions

View File

@ -8,12 +8,12 @@
# Note: Replace ALL with a specific domain name if you want the user to be restricted to administer only
# a specific domain.
#
# sh add-domain-admin.sh user@example.com ALL
# bash add-domain-admin.sh user@example.com ALL
#
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh new-domain.sh example.com > output.sql
# bash new-domain.sh example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -31,7 +31,7 @@ domain="$2"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 2 ]; then
printf "Purpose: Makes an existing user a domain admin in iRedMail. \n"
printf "Note: Replace ALL with a specific domain name if you want the user to be restricted to administer only a specific domain. \n"
printf "Usage: sh add-domain-admin.sh user@example.com ALL\n"
printf "Usage: bash add-domain-admin.sh user@example.com ALL\n"
exit 0
fi

View File

@ -7,12 +7,12 @@
# Note: Once the new domain is added to iRedMail in the database, you can they use create-new-user.sh or create-new-user-bulk.sh scripts to add user accounts.
# The usage of this script is only necessary when adding NEW domains to iRedMail as during installation time your initial domain will be added.
#
# sh new-domain.sh example.com
# bash new-domain.sh example.com
#
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh new-domain.sh example.com > output.sql
# bash new-domain.sh example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -28,7 +28,7 @@ domain="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Adds a new domain in iRedMail. \n"
printf "Usage: sh new-domain.sh example.com \n"
printf "Usage: bash new-domain.sh example.com \n"
exit 0
fi

View File

@ -12,7 +12,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh add-mail-forward.sh user@example.com otherUser@example.com > output.sql
# bash add-mail-forward.sh user@example.com otherUser@example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -29,7 +29,7 @@ forwardToEmail="$2"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 2 ]; then
printf "Purpose: Creates a mail forwarding setup to direct email sent to user@example.com otherUser@example.com in iRedmail. \n"
printf "Usage: sh add-mail-forward.sh user@example.com otherUser@example.com \n"
printf "Usage: bash add-mail-forward.sh user@example.com otherUser@example.com \n"
exit 0
fi

View File

@ -12,7 +12,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh add-user-to-alias.sh alias@mydomain.com jeff@gmail.com > output.sql
# bash add-user-to-alias.sh alias@mydomain.com jeff@gmail.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -30,7 +30,7 @@ sendToEmail="$2"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 2 ]; then
printf "Purpose: Add a user to an alias in iRedmail. \n"
printf "Note: The alias needs to exist first before you can add users to it. \n"
printf "Usage: sh add-user-to-alias.sh alias@mydomain.com jeff@gmail.com \n"
printf "Usage: bash add-user-to-alias.sh alias@mydomain.com jeff@gmail.com \n"
exit 0
fi

View File

@ -7,12 +7,12 @@
#
# WARNING: This changes ONLY the SQL side, the mail directory needs to be renamed as well as any existing maildir to reflect the new domain.
#
# sh change-domain.sh old-domain.com new-domain.com
# bash change-domain.sh old-domain.com new-domain.com
#
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh change-domain.sh old-domain.com new-domain.com > output.sql
# bash change-domain.sh old-domain.com new-domain.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -30,7 +30,7 @@ new="$2"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 2 ]; then
printf "Purpose: Change domain name of an existing domain and associated mail accounts in iRedmail. \n"
printf "WARNING: This changes ONLY the SQL side, the mail directory needs to be renamed as well as any existing maildir to reflect the new domain. \n"
printf "Usage: sh change-domain.sh old-domain.com new-domain.com \n"
printf "Usage: bash change-domain.sh old-domain.com new-domain.com \n"
exit 0
fi

View File

@ -20,7 +20,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh create-alias-policy.sh alias@mydomain.com public > output.sql
# bash create-alias-policy.sh alias@mydomain.com public > output.sql
#
# Import output.sql into SQL database like below:
#
@ -45,7 +45,7 @@ if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 2 ]; th
printf "moderatorsonly only moderators of this mail alias account are allowed. \n"
printf "membersandmoderatorsonly only members and moderators of this mail alias account are allowed. \n"
printf "\n"
printf "Usage: sh create-alias-policy.sh alias@mydomain.com public \n"
printf "Usage: bash create-alias-policy.sh alias@mydomain.com public \n"
exit 0
fi

View File

@ -10,7 +10,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh create-alias.sh alias@mydomain.com mydomain.com > output.sql
# bash create-alias.sh alias@mydomain.com mydomain.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -26,7 +26,7 @@ dlName="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Creates an alias in iRedmail, email sent to an alias goes to all addresses added onto the alias. \n"
printf "Usage: sh create-alias.sh alias@mydomain.com \n"
printf "Usage: bash create-alias.sh alias@mydomain.com \n"
exit 0
fi

View File

@ -5,12 +5,12 @@
# Purpose: Disables a domain in iRedMail.
# License: 2-clause BSD license
#
# sh disable-domain.sh example.com
# bash disable-domain.sh example.com
#
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh disable-domain.sh example.com > output.sql
# bash disable-domain.sh example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -26,7 +26,7 @@ domain="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Disables a domain in iRedMail. \n"
printf "Usage: sh disable-domain.sh example.com \n"
printf "Usage: bash disable-domain.sh example.com \n"
exit 0
fi

View File

@ -5,12 +5,12 @@
# Purpose: Disables enableimap,enableimapsecured,enableimaptls in the mailbox table for a given user to be 0 (disabled) in iRedmail so to disable IMAP.
# License: 2-clause BSD license
#
# sh disable-imap-for-user.sh jeff@example.com
# bash disable-imap-for-user.sh jeff@example.com
#
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh disable-imap-for-user.sh jeff@example.com > output.sql
# bash disable-imap-for-user.sh jeff@example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -26,7 +26,7 @@ username="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Disables enableimap,enableimapsecured,enableimaptls in the mailbox table for a given user to be 0 (disabled) in iRedmail so to disable IMAP. \n"
printf "Usage: sh disable-imap-for-user.sh jeff@example.com \n"
printf "Usage: bash disable-imap-for-user.sh jeff@example.com \n"
exit 0
fi

View File

@ -5,12 +5,12 @@
# Purpose: Disable mail forwarding or from an alias, from a user account to another mail account in iRedmail.
# License: 2-clause BSD license
#
# sh disable-mail-forwarding.sh fromUser@example.com toUser@example.com
# bash disable-mail-forwarding.sh fromUser@example.com toUser@example.com
#
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh disable-mail-forwarding.sh fromUser@example.com toUser@example.com > output.sql
# bash disable-mail-forwarding.sh fromUser@example.com toUser@example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -27,7 +27,7 @@ toUser="$2"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 2 ]; then
printf "Purpose: Disable mail forwarding or from an alias, from a user account to another mail account in iRedmail. \n"
printf "Usage: sh disable-mail-forwarding.sh fromUser@example.com toUser@example.com \n"
printf "Usage: bash disable-mail-forwarding.sh fromUser@example.com toUser@example.com \n"
exit 0
fi

View File

@ -6,7 +6,7 @@
# License: 2-clause BSD license
# Note: This is a one time change for all CURRENT user accounts, future accounts require the use of disable-pop3-for-user.sh to disable pop3 for an individual account.
#
# Usage: sh disable-pop3-for-domain.sh example.com
# Usage: bash disable-pop3-for-domain.sh example.com
#
# Note: You can verify if this was successful with the following command:
# select username,domain,enablepop3,enablepop3secured,enablepop3tls FROM mailbox;
@ -14,7 +14,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh disable-pop3-for-domain.sh example.com > output.sql
# bash disable-pop3-for-domain.sh example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -31,7 +31,7 @@ domain="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Disables enablepop3,enablepop3secured,enablepop3tls in the mailbox table for a given domain to be 0 (disabled) in iRedmail so to disable pop3. \n"
printf "Note: This is a one time change for all CURRENT user accounts, future accounts require the use of disable-pop3-for-user.sh to disable pop3 for an individual account. \n"
printf "Usage: sh disable-pop3-for-domain.sh example.com \n"
printf "Usage: bash disable-pop3-for-domain.sh example.com \n"
exit 0
fi

View File

@ -5,12 +5,12 @@
# Purpose: Disables enablepop3,enablepop3secured,enablepop3tls in the mailbox table for a given user to be 0 (disabled) in iRedmail so to disable pop3.
# License: 2-clause BSD license
#
# sh disable-pop3-for-user.sh jeff@example.com
# bash disable-pop3-for-user.sh jeff@example.com
#
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh disable-pop3-for-user.sh jeff@example.com > output.sql
# bash disable-pop3-for-user.sh jeff@example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -26,7 +26,7 @@ username="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Disables enablepop3,enablepop3secured,enablepop3tls in the mailbox table for a given user to be 0 (disabled) in iRedmail so to disable pop3. \n"
printf "Usage: sh disable-pop3-for-user.sh jeff@example.com \n"
printf "Usage: bash disable-pop3-for-user.sh jeff@example.com \n"
exit 0
fi

View File

@ -10,7 +10,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh disable-user.sh jeff@example.com > output.sql
# bash disable-user.sh jeff@example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -26,7 +26,7 @@ username="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Disables a user account in iRedmail. \n"
printf "Usage: sh disable-user.sh jeff@example.com \n"
printf "Usage: bash disable-user.sh jeff@example.com \n"
exit 0
fi

View File

@ -5,12 +5,12 @@
# Purpose: Re-enables a disabled domain in iRedMail.
# License: 2-clause BSD license
#
# sh enable-domain.sh example.com
# bash enable-domain.sh example.com
#
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh enable-domain.sh example.com > output.sql
# bash enable-domain.sh example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -26,7 +26,7 @@ domain="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Re-enable a disabled domain in iRedMail. \n"
printf "Usage: sh enable-domain.sh example.com \n"
printf "Usage: bash enable-domain.sh example.com \n"
exit 0
fi

View File

@ -5,12 +5,12 @@
# Purpose: Enables enableimap,enableimapsecured,enableimaptls in the mailbox table for a given user to be 1 (enabled) in iRedmail so to enable IMAP.
# License: 2-clause BSD license
#
# sh enable-imap-for-user.sh jeff@example.com
# bash enable-imap-for-user.sh jeff@example.com
#
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh enable-imap-for-user.sh jeff@example.com > output.sql
# bash enable-imap-for-user.sh jeff@example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -26,7 +26,7 @@ username="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Enables enableimap,enableimapsecured,enableimaptls in the mailbox table for a given user to be 1 (enabled) in iRedmail so to enable IMAP. \n"
printf "Usage: sh enable-imap-for-user.sh jeff@example.com \n"
printf "Usage: bash enable-imap-for-user.sh jeff@example.com \n"
exit 0
fi

View File

@ -5,12 +5,12 @@
# Purpose: Re-enable mail forwarding or from an alias, from a user account to another mail account in iRedmail.
# License: 2-clause BSD license
#
# sh enable-mail-forwarding.sh fromUser@example.com toUser@example.com
# bash enable-mail-forwarding.sh fromUser@example.com toUser@example.com
#
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh enable-mail-forwarding.sh fromUser@example.com toUser@example.com > output.sql
# bash enable-mail-forwarding.sh fromUser@example.com toUser@example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -27,7 +27,7 @@ toUser="$2"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 2 ]; then
printf "Purpose: Re-enable mail forwarding or from an alias, from a user account to another mail account in iRedmail. \n"
printf "Usage: sh enable-mail-forwarding.sh fromUser@example.com toUser@example.com \n"
printf "Usage: bash enable-mail-forwarding.sh fromUser@example.com toUser@example.com \n"
exit 0
fi

View File

@ -6,7 +6,7 @@
# License: 2-clause BSD license
# Note: This is a one time change for all CURRENT user accounts, future accounts require the use of enable-pop3-for-user.sh to disable pop3 for an individual account.
#
# Usage: sh enable-pop3-for-domain.sh example.com
# Usage: bash enable-pop3-for-domain.sh example.com
#
# Note: You can verify if this was successful with the following command:
# select username,domain,enablepop3,enablepop3secured,enablepop3tls FROM mailbox;
@ -14,7 +14,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh enable-pop3-for-domain.sh example.com > output.sql
# bash enable-pop3-for-domain.sh example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -31,7 +31,7 @@ domain="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Enables enablepop3,enablepop3secured,enablepop3tls in the mailbox table for a given domain to be 1 (enabled) in iRedmail so to enable pop3. \n"
printf "Note: This is a one time change for all CURRENT user accounts, future accounts require the use of enable-pop3-for-user.sh to disable pop3 for an individual account. \n"
printf "Usage: sh enable-pop3-for-domain.sh example.com \n"
printf "Usage: bash enable-pop3-for-domain.sh example.com \n"
exit 0
fi

View File

@ -5,12 +5,12 @@
# Purpose: Enables enablepop3,enablepop3secured,enablepop3tls in the mailbox table for a given user to be 1 (enabled) in iRedmail so to disable pop3.
# License: 2-clause BSD license
#
# sh enable-pop3-for-user.sh jeff@example.com
# bash enable-pop3-for-user.sh jeff@example.com
#
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh enable-pop3-for-user.sh jeff@example.com > output.sql
# bash enable-pop3-for-user.sh jeff@example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -26,7 +26,7 @@ username="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Enables enablepop3,enablepop3secured,enablepop3tls in the mailbox table for a given user to be 1 (enabled) in iRedmail so to disable pop3. \n"
printf "Usage: sh enable-pop3-for-user.sh jeff@example.com \n"
printf "Usage: bash enable-pop3-for-user.sh jeff@example.com \n"
exit 0
fi

View File

@ -10,7 +10,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh enable-user.sh jeff@example.com > output.sql
# bash enable-user.sh jeff@example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -26,7 +26,7 @@ username="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Re-enable a disabled user account in iRedmail. \n"
printf "Usage: sh enable-user.sh jeff@example.com \n"
printf "Usage: bash enable-user.sh jeff@example.com \n"
exit 0
fi

View File

@ -12,7 +12,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh increase-all-mailbox-quota.sh example.com 2048 > output.sql
# bash increase-all-mailbox-quota.sh example.com 2048 > output.sql
#
# Import output.sql into SQL database like below:
#
@ -30,7 +30,7 @@ quota="$2"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 2 ]; then
printf "Purpose: Increases the mail box quota size for all users regardless of domain, or for a specific domain, in iRedmail. \n"
printf "Note: Replace the domain name with a quoted asterisk (*) to update all current users with the new mailbox quota size."
printf "Usage: sh increase-all-mailbox-quota.sh example.com 2048 OR sh increase-all-mailbox-quota.sh \"*\" 2048 \n"
printf "Usage: bash increase-all-mailbox-quota.sh example.com 2048 OR sh increase-all-mailbox-quota.sh \"*\" 2048 \n"
exit 0
fi

View File

@ -12,7 +12,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh increase-mailbox-quota.sh jeff@example.com 2048 > output.sql
# bash increase-mailbox-quota.sh jeff@example.com 2048 > output.sql
#
# Import output.sql into SQL database like below:
#
@ -29,7 +29,7 @@ quota="$2"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 2 ]; then
printf "Purpose: Updates the allowed mailbox size (quota) for a user in iRedmail. \n"
printf "Usage: sh increase-mailbox-quota.sh jeff@example.com 2048 \n"
printf "Usage: bash increase-mailbox-quota.sh jeff@example.com 2048 \n"
exit 0
fi

View File

@ -6,12 +6,12 @@
# License: 2-clause BSD license
# Reference: https://docs.iredmail.org/sql.create.mail.alias
#
# sh is-address-an-alias.sh jeff@example.com
# bash is-address-an-alias.sh jeff@example.com
#
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh is-address-an-alias.sh jeff@example.com > output.sql
# bash is-address-an-alias.sh jeff@example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -27,7 +27,7 @@ address="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Determine if a given email address is an alias in iRedmail. \n"
printf "Usage: sh is-address-an-alias.sh jeff@example.com \n"
printf "Usage: bash is-address-an-alias.sh jeff@example.com \n"
exit 0
fi

View File

@ -5,12 +5,12 @@
# Purpose: Determine if a given email address has forwards set from itself to other email addreses in iRedmail.
# License: 2-clause BSD license
#
# sh is-forward-from.sh jeff@example.com
# bash is-forward-from.sh jeff@example.com
#
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh is-forward-from.sh jeff@example.com > output.sql
# bash is-forward-from.sh jeff@example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -26,7 +26,7 @@ address="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Determine if a given email address has forwards set from itself to other email addreses in iRedmail. \n"
printf "Usage: sh is-forward-from.sh jeff@example.com \n"
printf "Usage: bash is-forward-from.sh jeff@example.com \n"
exit 0
fi

View File

@ -6,12 +6,12 @@
# License: 2-clause BSD license
# Note: If you see an address to itself in the forwarding column this is normal and is required for a regular account and mailbox to function.
#
# sh is-forward-to.sh jeff@example.com
# bash is-forward-to.sh jeff@example.com
#
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh is-forward-to.sh jeff@example.com > output.sql
# bash is-forward-to.sh jeff@example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -28,7 +28,7 @@ address="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Determine if a given email address has forwards set from itself to other email addreses in iRedmail. \n"
printf "Note: If you see an address to itself in the forwarding column this is normal and is required for a regular account and mailbox to function. \n"
printf "Usage: sh is-forward-to.sh jeff@example.com \n"
printf "Usage: bash is-forward-to.sh jeff@example.com \n"
exit 0
fi

View File

@ -10,7 +10,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh list-active-accounts.sh > output.sql
# bash list-active-accounts.sh > output.sql
#
# Import output.sql into SQL database like below:
#
@ -23,7 +23,7 @@
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -gt 0 ]; then
printf "Purpose: Lists active email accounts in iRedmail. \n"
printf "Usage: sh list-active-accounts.sh \n"
printf "Usage: bash list-active-accounts.sh \n"
exit 0
fi

View File

@ -10,7 +10,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh list-all-accounts.sh > output.sql
# bash list-all-accounts.sh > output.sql
#
# Import output.sql into SQL database like below:
#
@ -23,7 +23,7 @@
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -gt 0 ]; then
printf "Purpose: Lists all email accounts in iRedmail from the mailbox table, does not include aliases. \n"
printf "Usage: sh list-all-accounts.sh \n"
printf "Usage: bash list-all-accounts.sh \n"
exit 0
fi

View File

@ -10,7 +10,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh list-all-but-regular-accounts.sh > output.sql
# bash list-all-but-regular-accounts.sh > output.sql
#
# Import output.sql into SQL database like below:
#
@ -23,7 +23,7 @@
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -gt 0 ]; then
printf "Purpose: Lists all from the forwardings table that are not just regular accounts in iRedmail. \n"
printf "Usage: sh list-all-but-regular-accounts.sh \n"
printf "Usage: bash list-all-but-regular-accounts.sh \n"
exit 0
fi

View File

@ -10,7 +10,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh list-forwarding-active.sh > output.sql
# bash list-forwarding-active.sh > output.sql
#
# Import output.sql into SQL database like below:
#
@ -23,7 +23,7 @@
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -gt 0 ]; then
printf "Purpose: Lists all active email forwarding configurations in iRedmail. \n"
printf "Usage: sh list-forwarding-active.sh \n"
printf "Usage: bash list-forwarding-active.sh \n"
exit 0
fi

View File

@ -10,7 +10,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh list-inactive-accounts.sh > output.sql
# bash list-inactive-accounts.sh > output.sql
#
# Import output.sql into SQL database like below:
#
@ -23,7 +23,7 @@
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -gt 0 ]; then
printf "Purpose: Lists inactive email accounts in iRedmail. \n"
printf "Usage: sh list-inactive-accounts.sh \n"
printf "Usage: bash list-inactive-accounts.sh \n"
exit 0
fi

View File

@ -10,7 +10,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh list-largest-to-smallest-mailbox.sh > output.sql
# bash list-largest-to-smallest-mailbox.sh > output.sql
#
# Import output.sql into SQL database like below:
#
@ -23,7 +23,7 @@
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -gt 0 ]; then
printf "Purpose: Lists mailboxes in vmail db in used_quota from largest to smallest in iRedmail. \n"
printf "Usage: sh list-largest-to-smallest-mailbox.sh \n"
printf "Usage: bash list-largest-to-smallest-mailbox.sh \n"
exit 0
fi

View File

@ -10,7 +10,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh list-top-10-mailbox.sh > output.sql
# bash list-top-10-mailbox.sh > output.sql
#
# Import output.sql into SQL database like below:
#
@ -23,7 +23,7 @@
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -gt 0 ]; then
printf "Purpose: Lists top 10 mailboxes in vmail db in used_quota from largest to smallest in iRedmail. \n"
printf "Usage: sh list-top-10-mailbox.sh \n"
printf "Usage: bash list-top-10-mailbox.sh \n"
exit 0
fi

View File

@ -10,7 +10,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh remove-alias.sh alias@mydomain.com > output.sql
# bash remove-alias.sh alias@mydomain.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -26,7 +26,7 @@ aliasName="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Creates an alias address which can be used to send email to multiple users at once when they are added 'onto' the alias in iRedmail. \n"
printf "Usage: sh remove-alias.sh alias@mydomain.com \n"
printf "Usage: bash remove-alias.sh alias@mydomain.com \n"
exit 0
fi

View File

@ -5,12 +5,12 @@
# Purpose: Remove a users entry entirely from the domain_admins table in iRedMail.
# License: 2-clause BSD license
#
# sh remove-domain-admin.sh user@example.com
# bash remove-domain-admin.sh user@example.com
#
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh remove-domain-admin.sh user@example.com > output.sql
# bash remove-domain-admin.sh user@example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -26,7 +26,7 @@ username="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Remove a users entry entirely from the domain_admins table in iRedMail. \n"
printf "Usage: sh remove-domain-admin.sh user@example.com \n"
printf "Usage: bash remove-domain-admin.sh user@example.com \n"
exit 0
fi

View File

@ -6,12 +6,12 @@
# License: 2-clause BSD license
# Note: Once the domain is removed from the database, you can they use remove-user.sh script to remove user accounts.
#
# sh remove-domain.sh example.com
# bash remove-domain.sh example.com
#
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh remove-domain.sh example.com > output.sql
# bash remove-domain.sh example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -28,7 +28,7 @@ domain="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Remove a domain from iRedMail. This does not remove associates mail accounts or mailboxes. \n"
printf "Note: Once the domain is removed from the database, you can they use remove-user.sh script to remove user accounts. \n"
printf "Usage: sh remove-domain.sh example.com \n"
printf "Usage: bash remove-domain.sh example.com \n"
exit 0
fi

View File

@ -10,7 +10,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh remove-forwarding.sh alias@mydomain.com jeff@gmail.com > output.sql
# bash remove-forwarding.sh alias@mydomain.com jeff@gmail.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -27,7 +27,7 @@ destinationAddress="$2"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 2 ]; then
printf "Purpose: Remove mail forwarding for a user or remove a user from an alias in iRedmail. \n"
printf "Usage: sh remove-forwarding.sh alias@mydomain.com jeff@gmail.com \n"
printf "Usage: bash remove-forwarding.sh alias@mydomain.com jeff@gmail.com \n"
exit 0
fi

View File

@ -10,7 +10,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh remove-user.sh jeff@example.com > output.sql
# bash remove-user.sh jeff@example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -26,7 +26,7 @@ address="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Removes a user account from the database in iRedmail, this does not delete the mailbox stored on the filesystem. \n"
printf "Usage: sh remove-user.sh jeff@example.com \n"
printf "Usage: bash remove-user.sh jeff@example.com \n"
exit 0
fi

View File

@ -10,7 +10,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh remove-whole-forward.sh contact@mydomain.com > output.sql
# bash remove-whole-forward.sh contact@mydomain.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -27,7 +27,7 @@ destinationAddress="$2"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Removes the whole forwarding address and all forwards associated to it in iRedMail. \n"
printf "Usage: sh remove-whole-forward.sh contact@mydomain.com \n"
printf "Usage: bash remove-whole-forward.sh contact@mydomain.com \n"
exit 0
fi

View File

@ -5,12 +5,12 @@
# Purpose: Revokes a users domain administrator permission in iRedMail.
# License: 2-clause BSD license
#
# sh revoke-domain-admin.sh user@example.com
# bash revoke-domain-admin.sh user@example.com
#
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh revoke-domain-admin.sh user@example.com > output.sql
# bash revoke-domain-admin.sh user@example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -26,7 +26,7 @@ username="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -lt 1 ] || [ $# -ne 1 ]; then
printf "Purpose: Revokes a users domain administrator permission in iRedMail. \n"
printf "Usage: sh revoke-domain-admin.sh user@example.com \n"
printf "Usage: bash revoke-domain-admin.sh user@example.com \n"
exit 0
fi

View File

@ -10,7 +10,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh sh set-account-active.sh jeff@example.com > output.sql
# bash sh set-account-active.sh jeff@example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -26,7 +26,7 @@ address="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Re-activate a user account iRedmail. \n"
printf "Usage: sh set-account-active.sh jeff@example.com \n"
printf "Usage: bash set-account-active.sh jeff@example.com \n"
exit 0
fi

View File

@ -10,7 +10,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh sh set-account-inactive.sh jeff@example.com > output.sql
# bash sh set-account-inactive.sh jeff@example.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -26,7 +26,7 @@ address="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Deactivate a user account iRedmail. \n"
printf "Usage: sh set-account-inactive.sh jeff@example.com \n"
printf "Usage: bash set-account-inactive.sh jeff@example.com \n"
exit 0
fi

View File

@ -10,7 +10,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh set-alias-active.sh alias@mydomain.com > output.sql
# bash set-alias-active.sh alias@mydomain.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -26,7 +26,7 @@ aliasName="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Re-activates an alias in iRedmail. \n"
printf "Usage: sh set-alias-active.sh alias@mydomain.com \n"
printf "Usage: bash set-alias-active.sh alias@mydomain.com \n"
exit 0
fi

View File

@ -10,7 +10,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh set-alias-inactive.sh alias@mydomain.com > output.sql
# bash set-alias-inactive.sh alias@mydomain.com > output.sql
#
# Import output.sql into SQL database like below:
#
@ -26,7 +26,7 @@ aliasName="$1"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Updates an alias to become inactive in iRedmail. \n"
printf "Usage: sh set-alias-inactive.sh alias@mydomain.com \n"
printf "Usage: bash set-alias-inactive.sh alias@mydomain.com \n"
exit 0
fi

View File

@ -17,7 +17,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh update-account-password.sh jeff@example.com {SSHA512}ZJrxEEz44aTyd/srPRU3RH4zThW4PHFIDSGYyADEE/D3QUyrgWmiKHyajWN2SQA4+VAk6X5ePaqwbMQqqICj3BCnhYgc/SDc > output.sql
# bash update-account-password.sh jeff@example.com {SSHA512}ZJrxEEz44aTyd/srPRU3RH4zThW4PHFIDSGYyADEE/D3QUyrgWmiKHyajWN2SQA4+VAk6X5ePaqwbMQqqICj3BCnhYgc/SDc > output.sql
#
# Import output.sql into SQL database like below:
#
@ -40,7 +40,7 @@ if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 2 ]; th
printf "Purpose: Updates the password for a user account in iRedmail. \n"
printf "Note: You can also use this script to change hashing algorithms. If you made an account with SHA512 but actually wanted bcrypt you can change that by updating the password."
printf "Note: Default password scheme is SSHA512, enter a different scheme as the third parameter if you wish to override. Available schemes: BCRYPT, SSHA512, SSHA, MD5, NTLM, PLAIN. \n"
printf "Usage: sh update-account-password.sh jeff@example.com Password123 \n"
printf "Usage: bash update-account-password.sh jeff@example.com Password123 \n"
exit 0
fi

View File

@ -6,12 +6,12 @@
# License: 2-clause BSD license
#
# Note: 2048 is the new domain quota for NEWLY created mailboxes.
# sh update-all-quota.sh example.com 2048
# bash update-all-quota.sh example.com 2048
#
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh update-all-domain-quota.sh 2048 > output.sql
# bash update-all-domain-quota.sh 2048 > output.sql
#
# Import output.sql into SQL database like below:
#
@ -28,7 +28,7 @@ quota="$2"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 1 ]; then
printf "Purpose: Updates the default quota for mailbox size for all domains, setting applies to all newly created mailboxes, in iRedmail. \n"
printf "Usage: sh update-all-domain-quota.sh 2048 \n"
printf "Usage: bash update-all-domain-quota.sh 2048 \n"
exit 0
fi

View File

@ -11,7 +11,7 @@
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh update-domain-quota.sh example.com 2048 > output.sql
# bash update-domain-quota.sh example.com 2048 > output.sql
#
# Import output.sql into SQL database like below:
#
@ -29,7 +29,7 @@ quota="$2"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 2 ]; then
printf "Purpose: Updates the default quota for mailbox size for a domain in iRedmail. \n"
printf "Note: example.com is the name of your domain and 2048 is the new domain quota for NEWLY created mailboxes. \n"
printf "Usage: sh update-domain-quota.sh example.com 2048 \n"
printf "Usage: bash update-domain-quota.sh example.com 2048 \n"
exit 0
fi

View File

@ -8,12 +8,12 @@
# Note: /var/vmail is the default value and should NOT be changed without good reason.
# Note #2: The files and folders on the file system will not be moved to the new location without you doing so.
#
# sh update-storagebasedirectory.sh /var/vmail /var/someNewLocation
# bash update-storagebasedirectory.sh /var/vmail /var/someNewLocation
#
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh update-storagebasedirectory.sh /var/vmail /var/someNewLocation > output.sql
# bash update-storagebasedirectory.sh /var/vmail /var/someNewLocation > output.sql
#
# Import output.sql into SQL database like below:
#
@ -32,7 +32,7 @@ domain="$3"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 3 ]; then
printf "Purpose: Updates the storagebasedirectory in iRedmail, this by default is /var/vmail. \n"
printf "Note: This can apply to all user accounts regardless of domain, or you can specify a domain. In the third parameter put ALL for every domain, or list a specific domain. \n"
printf "Usage: sh update-storagebasedirectory.sh /var/vmail /var/someNewLocation example.com \n"
printf "Usage: bash update-storagebasedirectory.sh /var/vmail /var/someNewLocation example.com \n"
exit 0
fi

View File

@ -8,12 +8,12 @@
# Note: vmail1 is the default value and should NOT be changed without good reason.
# Note #2: The files and folders on the file system will not be moved to the new location without you doing so.
#
# sh update-storagenode.sh vmail1 vmail2
# bash update-storagenode.sh vmail1 vmail2
#
# This will print SQL commands on the console directly, you can redirect the
# output to a file for further use like this:
#
# sh update-storagenode.sh vmail1 vmail2 > output.sql
# bash update-storagenode.sh vmail1 vmail2 > output.sql
#
# Import output.sql into SQL database like below:
#
@ -32,7 +32,7 @@ domain="$3"
if [ "$1" == "-h" ] || [ "$1" == "--h" ] || [ "$1" == "/h" ] || [ $# -ne 3 ]; then
printf "Purpose: Updates the storagenode in iRedmail, this by default is vmail1. \n"
printf "Note: This can apply to all user accounts regardless of domain, or you can specify a domain. In the third parameter put ALL for every domain, or list a specific domain. \n"
printf "Usage: sh update-storagenode.sh vmail1 vmail2 example.com \n"
printf "Usage: bash update-storagenode.sh vmail1 vmail2 example.com \n"
exit 0
fi