From b23afe500df7ef025ed68369355ca0b6856a8719 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Mon, 14 Sep 2020 16:07:42 -0600 Subject: [PATCH] add mailserver option handling --- ab-openldap/ab-openldap.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ab-openldap/ab-openldap.sh b/ab-openldap/ab-openldap.sh index 647d0f7..ce21d33 100755 --- a/ab-openldap/ab-openldap.sh +++ b/ab-openldap/ab-openldap.sh @@ -181,6 +181,22 @@ while [ $# -gt 0 ]; do volume_ldif="$2" shift ;; + --mailserver) + # mailserver for IMAP/S password verification + if [ -z "$2" ]; then + consoleError '1' 'You must specify a mailserver hostname when using --mailserver.' + fi + mailserver="$2" + shift + ;; + --mailserver-port) + # specify IMAP/S port for mailserver + if [ -z "$2" ]; then + consoleError '1' 'You must specify a port when using --mailserver-port.' + fi + mailserver_port="$2" + shift + ;; --backupdir) # location of backup files to restore if [ -z "$2" ]; then