diff options
author | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2015-05-20 17:37:47 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2015-05-20 17:37:47 +0200 |
commit | d74faebc3b50f8af931626ee8815046167e147e4 (patch) | |
tree | 638c3205c05d8d2a7efd60428f88e552b54e2dd0 | |
parent | 1ba25afb4b0021f8d77f961ba4923fa27c390c62 (diff) |
Make TLS use configurable from tb config.
-rwxr-xr-x | tb/tb | 2 | ||||
-rw-r--r-- | tb/tb_internals.sh | 9 |
2 files changed, 7 insertions, 4 deletions
@@ -165,7 +165,7 @@ TB_POST_BUILD_DELAY=<num_of_seconds> Pause in second after a build. G Level parameter TB_SMTP_HOST=<smtp_hostname> Hostname of the smtp server to use to send email. This paramter is mandatory in tb mode - +TB_SMTP_TLS=<auto|yes|no> Email TLS mode - auto-detect, enforce, or switch-off. TB_SMTP_PASSWORD=<password> Password associated with TB_SMTP_USER. This paramter is mandatory if TB_SMTP_USER is specified TB_SMTP_USER=<username> Username to login to the smtp server. diff --git a/tb/tb_internals.sh b/tb/tb_internals.sh index 11aef67..e2a471f 100644 --- a/tb/tb_internals.sh +++ b/tb/tb_internals.sh @@ -1170,15 +1170,18 @@ send_mail_msg() if [ -n "${TB_SMTP_USER}" ] ; then smtp_auth="-xu ${TB_SMTP_USER?} -xp ${TB_SMTP_PASSWORD?}" fi + if [ -n "${TB_SMTP_TLS}" ] ; then + smtp_tls="-o tls=${TB_SMTP_TLS?}" + fi [ $V ] && log_msgs "send mail to ${to?} with subject \"${subject?}\"" [ $V ] && quiet="" if [ -n "${log}" ] ; then - ${tb_BIN_DIR?}/tb_send_email $quiet -f "${TB_OWNER?}" -s "${TB_SMTP_HOST?}" $smtp_auth -t "${to?}" -bcc "${bcc?}" -u "${subject?}" -o "message-header=${headers?}" -a "${log?}" + ${tb_BIN_DIR?}/tb_send_email $quiet -f "${TB_OWNER?}" -s "${TB_SMTP_HOST?}" $smtp_auth $smtp_tls -t "${to?}" -bcc "${bcc?}" -u "${subject?}" -o "message-header=${headers?}" -a "${log?}" elif [ -n "${headers?}" ] ; then - ${tb_BIN_DIR?}/tb_send_email $quiet -f "${TB_OWNER?}" -s "${TB_SMTP_HOST?}" $smtp_auth -t "${to?}" -bcc "${bcc?}" -u "${subject?}" -o "message-header=${headers?}" + ${tb_BIN_DIR?}/tb_send_email $quiet -f "${TB_OWNER?}" -s "${TB_SMTP_HOST?}" $smtp_auth $smtp_tls -t "${to?}" -bcc "${bcc?}" -u "${subject?}" -o "message-header=${headers?}" else - ${tb_BIN_DIR?}/tb_send_email $quiet -f "${TB_OWNER?}" -s "${TB_SMTP_HOST?}" $smtp_auth -t "${to?}" -bcc "${bcc?}" -u "${subject?}" + ${tb_BIN_DIR?}/tb_send_email $quiet -f "${TB_OWNER?}" -s "${TB_SMTP_HOST?}" $smtp_auth $smtp_tls -t "${to?}" -bcc "${bcc?}" -u "${subject?}" fi } |