From d11e1bacc3675d5606d7396bb8ee0052affb2f04 Mon Sep 17 00:00:00 2001 From: Christoph Date: Mon, 22 Oct 2018 15:01:09 +0200 Subject: [PATCH 1/7] Change .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 26aefbe..cc8e7d4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ +!README* + # - common *.log *.swp From ccc627932e506189a37932ab642a8f8503f35858 Mon Sep 17 00:00:00 2001 From: Christoph Date: Mon, 22 Oct 2018 15:03:46 +0200 Subject: [PATCH 2/7] Add Documentation /README files) for dovecot. --- .gitignore | 4 +- DOC/dovecot/README.dovecot.index | 12 ++ DOC/dovecot/README.dovecot.recalculate_quota | 12 ++ DOC/dovecot/README.dovecot.systemd | 21 ++++ DOC/dovecot/lmtp_notice.txt | 123 +++++++++++++++++++ 5 files changed, 169 insertions(+), 3 deletions(-) create mode 100644 DOC/dovecot/README.dovecot.index create mode 100644 DOC/dovecot/README.dovecot.recalculate_quota create mode 100644 DOC/dovecot/README.dovecot.systemd create mode 100644 DOC/dovecot/lmtp_notice.txt diff --git a/.gitignore b/.gitignore index cc8e7d4..35e9223 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ -!README* - # - common *.log *.swp @@ -16,7 +14,7 @@ postfixadmin-* crontab-root* # - Dovecot -dovecot* +dovecot-* log* # - roundcube diff --git a/DOC/dovecot/README.dovecot.index b/DOC/dovecot/README.dovecot.index new file mode 100644 index 0000000..9efade3 --- /dev/null +++ b/DOC/dovecot/README.dovecot.index @@ -0,0 +1,12 @@ +# ---------- +# - Doveadm-Index +# ---------- + +# - Index users INBOX: +# - +doveadm index -u INBOX + + +# - Index INBOX for ALL users +# - +doveadm index -A diff --git a/DOC/dovecot/README.dovecot.recalculate_quota b/DOC/dovecot/README.dovecot.recalculate_quota new file mode 100644 index 0000000..d13fec8 --- /dev/null +++ b/DOC/dovecot/README.dovecot.recalculate_quota @@ -0,0 +1,12 @@ +# ---------- +# - Force Dovecot to recalculate mailbox quota +# ---------- + +# - Recalculate one mailbox: +# - +doveadm quota recalc -u + + +# - Recalculate ALL mail accounts: +# - +doveadm quota recalc -A diff --git a/DOC/dovecot/README.dovecot.systemd b/DOC/dovecot/README.dovecot.systemd new file mode 100644 index 0000000..6d2aeaa --- /dev/null +++ b/DOC/dovecot/README.dovecot.systemd @@ -0,0 +1,21 @@ + + +Debian Jessie comes with systemd so you really should not use initscript anymore but +switch to systemd for starting dovecot. There is systemd service description file available +for you in case your vendor does not provide it in the package: + +https://github.com/dovecot/core/blob/master/dovecot.service.in + +-- + +> i use ./configure with +> --with-systemdsystemunitdir=/etc/systemd/system/ and that installs the +> systemd.service and socket + +That's what I missed, thank you a lot. And service seems to handle +correctly restarts + +Also use: + --with-rundir=/var/run/dovecot + +-- diff --git a/DOC/dovecot/lmtp_notice.txt b/DOC/dovecot/lmtp_notice.txt new file mode 100644 index 0000000..1990a45 --- /dev/null +++ b/DOC/dovecot/lmtp_notice.txt @@ -0,0 +1,123 @@ + + +- to drop cached lmtp adress verification, delete file + /var/lib/postfix/verify_cache.db + + + +mail RCPT TO: test-help@warenform.com +===================================== + +configuration: + + sql-connect.conf.ext : + user_query = SELECT.. WHERE username = substring ('%u' from '#"[^-]+#"_*@%%' for '#') || '@%d' and active = true + + 15-lda.conf: + recipient_delimiter = + + 90-sieve.conf: + recipient_delimiter = + +--> stored mail into mailbox 'INBOX' + no "Error:" in dovecot.log + +configuration: + + sql-connect.conf.ext : + user_query = SELECT.. WHERE username = substring ('%u' from '#"[^-]+#"_*@%%' for '#') || '@%d' and active = true + + 15-lda.conf: + recipient_delimiter = + + 90-sieve.conf: + recipient_delimiter = - + +--> stored mail into mailbox 'INBOX' + no "Error:" in dovecot.log + +configuration: + + sql-connect.conf.ext : + user_query = SELECT.. WHERE username = substring ('%u' from '#"[^-]+#"_*@%%' for '#') || '@%d' and active = true + + 15-lda.conf: + recipient_delimiter = - + + 90-sieve.conf: + recipient_delimiter = + +--> stored mail into mailbox 'help' + no "Error:" in dovecot.log + +configuration: + + sql-connect.conf.ext : + user_query = SELECT.. WHERE username = substring ('%u' from '#"[^-]+#"_*@%%' for '#') || '@%d' and active = true + + 15-lda.conf: + recipient_delimiter = - + + 90-sieve.conf: + recipient_delimiter = - + +--> stored mail into mailbox 'help' + no "Error:" in dovecot.log + + + +configuration: + + sql-connect.conf.ext : + user_query = SELECT.. WHERE username = '%u' and active = true + + 15-lda.conf: + recipient_delimiter = + + 90-sieve.conf: + recipient_delimiter = + +--> 550 5.1.1 User doesn't exist: ... + no "Error:" in dovecot.log + +configuration: + + sql-connect.conf.ext : + user_query = SELECT.. WHERE username = '%u' and active = true + + 15-lda.conf: + recipient_delimiter = + + 90-sieve.conf: + recipient_delimiter = - + +--> 550 5.1.1 User doesn't exist: ... + no "Error:" in dovecot.log + +configuration: + + sql-connect.conf.ext : + user_query = SELECT.. WHERE username = '%u' and active = true + + 15-lda.conf: + recipient_delimiter = - + + 90-sieve.conf: + recipient_delimiter = + +--> stored mail into mailbox 'help' + no "Error:" in dovecot.log + +configuration: + + sql-connect.conf.ext : + user_query = SELECT.. WHERE username = '%u' and active = true + + 15-lda.conf: + recipient_delimiter = - + + 90-sieve.conf: + recipient_delimiter = - + +--> stored mail into mailbox 'help' + no "Error:" in dovecot.log From 3412f378241a5251748342ba50bb94628a55009e Mon Sep 17 00:00:00 2001 From: Christoph Date: Wed, 24 Oct 2018 14:08:19 +0200 Subject: [PATCH 3/7] Add default values if no configuration file is present or value not given. --- install_amavis.sh | 128 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 118 insertions(+), 10 deletions(-) diff --git a/install_amavis.sh b/install_amavis.sh index 2058ec2..f01e4ac 100755 --- a/install_amavis.sh +++ b/install_amavis.sh @@ -1,7 +1,13 @@ #!/usr/bin/env bash -_QUARANTINE_ADMIN='postmaster\@$mydomain' -QUARANTINE_ADMIN=$_QUARANTINE_ADMIN + +script_dir="$(realpath $(dirname $0))" +script_name="$(basename "$0")" +conf_file="${script_dir}/conf/install_amavis.conf" + +backup_date="$(date +%Y-%m-%d-%H%M)" +crontab_backup_file="${script_dir}/crontab-root-${backup_date}.install_amavis.lst" + # ------------- @@ -90,6 +96,29 @@ detect_os_1 () { } +# ------------- +# --- Some default settings +# ------------- + +DEFAULT_QUARANTINE_DIR="/var/QUARANTINE" +DEFAULT_QUARANTINE_ADMIN='postmaster\@$mydomain' +DEFAULT_DB_IN_USE=false + +DEFAULT_INSTALL_CLAMAV_UNOFFICIAL_SIGS=true + +DEFAULT_MALWARE_PATROL_IN_USE=true +DEFAULT_MALWERE_PATROL_FREE=false +DEFAULT_MP_RECEIPT_NUMBER=106015125438 + +DEFAULT_SECURITE_INFO_IN_USE=true +DEFAULT_SI_AUTHORISATION_SIGNATURE_WF=76ed7ca6670dbee497e1a0397a7e178c4caa25888bc26d7327d1eab0195342a4cfa522dcf10382623d57dbc2a79bd37627b9a52def4d4bfe617d26e35405ce3b +DEFAULT_SI_AUTHORISATION_SIGNATURE_OOPEN=b0b7e94d3fcc8f3b1f128edd5830392361868cf0174723a9924ac25bf8b1b588cb974b50234e1bc1d9839dfe0ca6e1627733d90daf1399347b1046d20c2e3a89 + +# - This parameter will be not asked, so setting it here +# - +QUARANTINE_ADMIN=$DEFAULT_QUARANTINE_ADMIN + + # - Is this a systemd system? # - if [[ "X`which systemd`" = "X" ]]; then @@ -107,17 +136,34 @@ detect_os_1 echo "" - -script_dir="$(realpath $(dirname $0))" -conf_file="${script_dir}/conf/install_amavis.conf" - -backup_date="$(date +%Y-%m-%d-%H%M)" -crontab_backup_file="${script_dir}/crontab-root-${backup_date}.install_amavis.lst" - if [[ -f "$conf_file" ]]; then source $conf_file fi + + +# ------------- +# --- Set default values for some non existent variables (i.e. no configuration file is present) +# ------------- + +if [[ -z "$_HOSTNAME" ]] ; then + _HOSTNAME="$(hostname -f)" + _HOSTNAME_SHORT="$(hostname)" + [[ "$_HOSTNAME" = "$_HOSTNAME_SHORT" ]] && _HOSTNAME="" +fi + + +[[ -z "$_QUARANTINE_DIR" ]] && _QUARANTINE_DIR="$DEFAULT_QUARANTINE_DIR" + +[[ -z "$_DB_IN_USE" ]] && _DB_IN_USE=$DEFAULT_DB_IN_USE + +[[ -z "$_INSTALL_CLAMAV_UNOFFICIAL_SIGS" ]] && _INSTALL_CLAMAV_UNOFFICIAL_SIGS=$DEFAULT_INSTALL_CLAMAV_UNOFFICIAL_SIGS + +[[ -z "$_MALWARE_PATROL_IN_USE" ]] && _MALWARE_PATROL_IN_USE=$DEFAULT_MALWARE_PATROL_IN_USE +[[ -z "$_MALWERE_PATROL_FREE" ]] && _MALWERE_PATROL_FREE=$DEFAULT_MALWERE_PATROL_FREE + +[[ -z "$_SECURITE_INFO_IN_USE" ]] && _SECURITE_INFO_IN_USE=$DEFAULT_SECURITE_INFO_IN_USE + #clear #echo "" #echo -e "\033[32m--\033[m" @@ -190,6 +236,43 @@ else fi + +# ------------- +# --- Some further default values depending on Hostname +# ------------- + +if [[ -z "$_HOSTNAME" ]] ; then + _HOSTNAME="$(hostname -f)" + _HOSTNAME_SHORT="$(hostname)" + [[ "$_HOSTNAME" = "$_HOSTNAME_SHORT" ]] && _HOSTNAME="" +fi + + +# - Set default values for ipv4- and ipv6-address +# - +if [[ -z $_IPV4 ]] && [[ -n "$_HOSTNAME" ]] && [[ -x "$(which dig)" ]]; then + _IPV4="$(dig +short "$_HOSTNAME" A)" +fi +if [[ -z $_IPV6 ]] && [[ -n "$_HOSTNAME" ]] && [[ -x "$(which dig)" ]]; then + _IPV6="$(dig +short "$_HOSTNAME" AAAA)" +fi + +# - Set defaul value for securite signature +# - +if [[ -z "$_SI_AUTHORISATION_SIGNATURE" ]]; then + [[ "$HOSTNAME" =~ warenform.de$ ]] && _SI_AUTHORISATION_SIGNATURE=$DEFAULT_SI_AUTHORISATION_SIGNATURE_WF + + # - For all this take O.OPEN's Signature + # - + [[ "$HOSTNAME" =~ oopen.de$ ]] && _SI_AUTHORISATION_SIGNATURE=$DEFAULT_SI_AUTHORISATION_SIGNATURE_OOPEN + [[ "$HOSTNAME" =~ cadus.org$ ]] && _SI_AUTHORISATION_SIGNATURE=$DEFAULT_SI_AUTHORISATION_SIGNATURE_OOPEN + [[ "$HOSTNAME" =~ so36.net$ ]] && _SI_AUTHORISATION_SIGNATURE=$DEFAULT_SI_AUTHORISATION_SIGNATURE_OOPEN + [[ "$HOSTNAME" =~ interventionistische-linke.org$ ]] && _SI_AUTHORISATION_SIGNATURE=$DEFAULT_SI_AUTHORISATION_SIGNATURE_OOPEN + +fi + + + IPV4= echo "" echo -e "\033[32m--\033[m" @@ -404,6 +487,11 @@ if $INSTALL_CLAMAV_UNOFFICIAL_SIGS ; then MALWERE_PATROL_FREE=false fi + # - Set default Value for Malware Patrol serial number (if non free account in use) + # - + if ! $MALWERE_PATROL_FREE ; then + [[ -z "$_MP_RECEIPT_NUMBER" ]] && _MP_RECEIPT_NUMBER="$DEFAULT_MP_RECEIPT_NUMBER" + fi echo "" echo -e "\033[32m--\033[m" @@ -730,7 +818,7 @@ echo "" echononl " Save Configuration" cat << EOF > $conf_file # --- -# - Parametersettins postfix bases system +# - Parametersettings for installscript $script_name # --- _HOSTNAME=$HOSTNAME @@ -748,11 +836,31 @@ _DB_USER=$DB_USER _DB_PASS=$DB_PASS _INSTALL_CLAMAV_UNOFFICIAL_SIGS=$INSTALL_CLAMAV_UNOFFICIAL_SIGS _MALWARE_PATROL_IN_USE=$MALWARE_PATROL_IN_USE +EOF +if $MALWARE_PATROL_IN_USE ; then + cat << EOF >> $conf_file _MALWERE_PATROL_FREE=$MALWERE_PATROL_FREE _MP_RECEIPT_NUMBER=$MP_RECEIPT_NUMBER +EOF +else + cat << EOF >> $conf_file +_MALWERE_PATROL_FREE= +_MP_RECEIPT_NUMBER= +EOF +fi +if $SECURITE_INFO_IN_USE ; then + cat << EOF >> $conf_file _SECURITE_INFO_IN_USE=$SECURITE_INFO_IN_USE _SI_AUTHORISATION_SIGNATURE=$SI_AUTHORISATION_SIGNATURE + EOF +else + cat << EOF >> $conf_file +_SECURITE_INFO_IN_USE=$SECURITE_INFO_IN_USE +_SI_AUTHORISATION_SIGNATURE= + +EOF +fi if [[ $? -eq 0 ]] ; then echo_ok else From 1aec32d68c45745c576cdd2325c2eedfae74085e Mon Sep 17 00:00:00 2001 From: Christoph Date: Wed, 24 Oct 2018 14:09:27 +0200 Subject: [PATCH 4/7] Get rid of unused (commented) code. --- install_amavis.sh | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/install_amavis.sh b/install_amavis.sh index f01e4ac..29076ad 100755 --- a/install_amavis.sh +++ b/install_amavis.sh @@ -164,49 +164,6 @@ fi [[ -z "$_SECURITE_INFO_IN_USE" ]] && _SECURITE_INFO_IN_USE=$DEFAULT_SECURITE_INFO_IN_USE -#clear -#echo "" -#echo -e "\033[32m--\033[m" -#echo "" -#echononl "Run with Install Script with previous settings (yes/no): " -#read OK -#OK=${OK,,} -#if [[ "X$OK" = "X" ]] ; then -# OK=yes -#fi -#while [ "X$OK" != "Xyes" -a "X$OK" != "Xno" ]; do -# echononl "Wrong entry! [yes/no]: " -# read OK -# OK=${OK,,} -#done -#[[ $OK = yes ]] && skip_interactive_use=true -# -#if $skip_interactive_use ; then -# -#HOSTNAME=$_HOSTNAME -#IPV4=$_IPV4 -#IPV6=$_IPV6 -# -#QUARANTINE_DIR=$_QUARANTINE_DIR -#QUARANTINE_ADMIN=$_QUARANTINE_ADMIN -# -#DB_IN_USE=$_DB_IN_USE -#DB_TYPE=$_DB_TYPE -#DB_HOST=$_DB_HOST -#DB_NAME=$_DB_NAME -#DB_USER=$_DB_USER -#DB_PASS=$_DB_PASS -#INSTALL_CLAMAV_UNOFFICIAL_SIGS=$_INSTALL_CLAMAV_UNOFFICIAL_SIGS -#MALWARE_PATROL_IN_USE=$_MALWARE_PATROL_IN_USE -#MALWERE_PATROL_FREE=$_MALWERE_PATROL_FREE -#MP_RECEIPT_NUMBER=$_MP_RECEIPT_NUMBER -#SECURITE_INFO_IN_USE=$_SECURITE_INFO_IN_USE -#SI_AUTHORISATION_SIGNATURE=$_SI_AUTHORISATION_SIGNATURE -# -#else -#clear -#echo -e "\033[21G\033[32mInstallation script for AMaViS, Spamassassin and ClamAV\033[m" -#echo clear echo -e "\033[21G\033[32mInstallation script for AMaViS, Spamassassin and ClamAV\033[m" From d8545aa36d39ef40ccdc72c326cb09b56b51ddc4 Mon Sep 17 00:00:00 2001 From: Christoph Date: Wed, 24 Oct 2018 14:17:18 +0200 Subject: [PATCH 5/7] Get rid of further double code. --- install_amavis.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/install_amavis.sh b/install_amavis.sh index 29076ad..cfb3efa 100755 --- a/install_amavis.sh +++ b/install_amavis.sh @@ -198,13 +198,6 @@ fi # --- Some further default values depending on Hostname # ------------- -if [[ -z "$_HOSTNAME" ]] ; then - _HOSTNAME="$(hostname -f)" - _HOSTNAME_SHORT="$(hostname)" - [[ "$_HOSTNAME" = "$_HOSTNAME_SHORT" ]] && _HOSTNAME="" -fi - - # - Set default values for ipv4- and ipv6-address # - if [[ -z $_IPV4 ]] && [[ -n "$_HOSTNAME" ]] && [[ -x "$(which dig)" ]]; then From 6e8e46af9815b16de7def30bfa31695540495419 Mon Sep 17 00:00:00 2001 From: Christoph Date: Wed, 24 Oct 2018 14:29:01 +0200 Subject: [PATCH 6/7] install_postfix_advanced.sh: add default values if no configuration file is present or some values not given. --- install_postfix_advanced.sh | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/install_postfix_advanced.sh b/install_postfix_advanced.sh index 70b2517..ee45fdf 100755 --- a/install_postfix_advanced.sh +++ b/install_postfix_advanced.sh @@ -82,6 +82,13 @@ echo_skipped() { trap clean_up SIGHUP SIGINT SIGTERM +# ------------- +# --- Some default settings +# ------------- + +DEFAULT_ADMIN_EMAIL="argus@oopen.de" + + # - Is this a systemd system? # - if [[ "X`which systemd`" = "X" ]]; then @@ -102,6 +109,21 @@ if [[ -f "$conf_file" ]]; then source $conf_file fi +[[ -z "$_ADMIN_EMAIL" ]] && _ADMIN_EMAIL="$DEFAULT_ADMIN_EMAIL" + + + +# ------------- +# --- Set default values for some non existent variables (i.e. no configuration file is present) +# ------------- + +if [[ -z "$_HOSTNAME" ]] ; then + _HOSTNAME="$(hostname -f)" + _HOSTNAME_SHORT="$(hostname)" + [[ "$_HOSTNAME" = "$_HOSTNAME_SHORT" ]] && _HOSTNAME="" +fi + + clear echo -e "\033[21G\033[32mInstallation script for Postfix basic mailsystem \033[m" echo @@ -128,6 +150,22 @@ else done fi + + +# ------------- +# --- Some further default values depending on Hostname +# ------------- + +# - Set default values for ipv4- and ipv6-address +# - +if [[ -z $_IPV4 ]] && [[ -n "$_HOSTNAME" ]] && [[ -x "$(which dig)" ]]; then + _IPV4="$(dig +short "$_HOSTNAME" A)" +fi +if [[ -z $_IPV6 ]] && [[ -n "$_HOSTNAME" ]] && [[ -x "$(which dig)" ]]; then + _IPV6="$(dig +short "$_HOSTNAME" AAAA)" +fi + + IPV4= echo "" echo -e "\033[32m--\033[m" From 408ac305925ae6a2270e0b764b3b8b3855e0c79e Mon Sep 17 00:00:00 2001 From: Christoph Date: Thu, 25 Oct 2018 01:10:56 +0200 Subject: [PATCH 7/7] install_postfix_base.sh: add default values if configuration file is not present or some values not set. --- install_postfix_base.sh | 86 +++++++++++++++++++++++++++++++---------- 1 file changed, 65 insertions(+), 21 deletions(-) diff --git a/install_postfix_base.sh b/install_postfix_base.sh index b68ec97..41436b8 100755 --- a/install_postfix_base.sh +++ b/install_postfix_base.sh @@ -1,27 +1,15 @@ #!/usr/bin/env bash +script_dir="$(dirname $(realpath $0))" +script_name="$(basename "$0")" + +conf_dir=$(dirname $0)/conf +conf_file="${conf_dir}/install_postfix_base.conf" + _TLS_CERT_DIR=/etc/postfix/ssl _TLS_CERT_FILE="${_TLS_CERT_DIR}/mailserver.crt" _TLS_KEY_FILE="${_TLS_CERT_DIR}/mailserver.key" -# _TLS_CA_FILE=/etc/ssl/certs/ca-certificates.crt -# -# -#_HOSTNAME=o15.oopen.de -#_IPV4=83.223.86.96 -#_EXT_IF_IP=83.223.86.96 -# -### - Leave empty, if no IPv6 should be supported -### - -#_IPV6=2a01:30:0:13:5054:ff:fe09:2318 -##_IPV6= -# -#_ADMIN_EMAIL=admin@oopen.de -# -#_SASL_AUTH=false -#_RELAY_HOST=b.mx.oopen.de -#_SASL_USER=anw-urb -#_SASL_PASS='OhPie2aethei' # ------------- @@ -81,6 +69,15 @@ echo_skipped() { } +# ------------- +# --- Some default settings +# ------------- + +DEFAULT_ADMIN_EMAIL="argus@oopen.de" +DEFAULT_RELAY_HOST="b.mx.oopen.de" +DEFAULT_SASL_AUTH=false + + # - Is this a systemd system? # - if [[ "X`which systemd`" = "X" ]]; then @@ -91,13 +88,27 @@ fi echo "" -conf_dir=$(dirname $0)/conf -conf_file="${conf_dir}/install_postfix_base.conf" - +# - Read Configuration File if exists +# - if [[ -f "$conf_file" ]]; then source $conf_file fi + +# ------------- +# --- Set default values for some non existent variables (i.e. no configuration file is present) +# ------------- + +[[ -z "$_ADMIN_EMAIL" ]] && _ADMIN_EMAIL="$DEFAULT_ADMIN_EMAIL" +[[ -z "$_SASL_AUTH" ]] && _SASL_AUTH="$DEFAULT_SASL_AUTH" + +if [[ -z "$_HOSTNAME" ]] ; then + _HOSTNAME="$(hostname -f)" + _HOSTNAME_SHORT="$(hostname)" + [[ "$_HOSTNAME" = "$_HOSTNAME_SHORT" ]] && _HOSTNAME="" +fi + + clear echo -e "\033[21G\033[32mInstallation script for Postfix basic mailsystem \033[m" echo @@ -124,6 +135,24 @@ else done fi + +# ------------- +# --- Some further default values depending on Hostname +# ------------- + +# - Set default values for ipv4- and ipv6-address +# - +if [[ -z $_IPV4 ]] && [[ -n "$_HOSTNAME" ]] && [[ -x "$(which dig)" ]]; then + _IPV4="$(dig +short "$_HOSTNAME" A)" +fi +if [[ -z $_IPV6 ]] && [[ -n "$_HOSTNAME" ]] && [[ -x "$(which dig)" ]]; then + _IPV6="$(dig +short "$_HOSTNAME" AAAA)" +fi +if [[ -z $_IPV6 ]]; then + _IPV6=None +fi + + IPV4= echo "" echo -e "\033[32m--\033[m" @@ -239,6 +268,21 @@ else fi done fi + + +# ------------- +# --- Some further default values depending on sasl authentification +# ------------- + +# - Set default value for relay host if sasl authentification should be +# - supported and value for _RELAY_HOST not given +# - +if [[ "$SASL_AUTH" = "yes" ]] || $SASL_AUTH ; then + [[ -z "$_RELAY_HOST" ]] && _RELAY_HOST="$DEFAULT_RELAY_HOST" +fi + + + if [[ "$SASL_AUTH" = "yes" ]] || $SASL_AUTH ; then SASL_AUTH=true