[Libreoffice-commits] buildbot.git: tb/config-sample tb/install tb/tb tb/tb_internals.sh tb/tb_phases.sh tb/tb_send_email

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri May 31 10:06:12 UTC 2019


 tb/config-sample/config                        |   22 -
 tb/config-sample/profiles/master_gerrit/config |    4 
 tb/install                                     |    6 
 tb/tb                                          |  106 ++---
 tb/tb_internals.sh                             |   64 +--
 tb/tb_phases.sh                                |    4 
 tb/tb_send_email                               |  496 ++++++++++++-------------
 7 files changed, 350 insertions(+), 352 deletions(-)

New commits:
commit e58198762b76ff1f0c88e2be261ea846ca391efe
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Tue May 28 21:02:11 2019 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri May 31 12:05:54 2019 +0200

    typo fixes
    
    Change-Id: I6fe227a667ceeef6b2bfe906d96b273d662730b8
    Reviewed-on: https://gerrit.libreoffice.org/73123
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/tb/config-sample/config b/tb/config-sample/config
index fa4663c..59b0e56 100644
--- a/tb/config-sample/config
+++ b/tb/config-sample/config
@@ -2,9 +2,9 @@
 # name of your tinderbox
 # see see http://wiki/documentfoundation.org/Development/Tinderbox
 # for naming convention
-# Note: @99 below is the tinderbox id. in oder to do gerrit
-# build you _must_ obtain a BuilbBot user associated with that id
-# see your friendly gerrit admin.
+# Note: @99 below is the tinderbox id. In order to do gerrit
+# build you _must_ obtain a BuildBot user associated with that id.
+# See your friendly gerrit admin.
 TB_NAME="Linux_x86_64 at 99-Template-Description"
 
 # this is the time the tb will go to sleep in case there is nothing to build (in seconds)
@@ -18,22 +18,22 @@ TB_POST_BUILD_DELAY=15
 TB_LOGIFLE=/lo/tb99.log
 
 # default email mode when doing a tb build
-# while debugggin your set-up you probably want =owner or =none here
+# while debugging your set-up you probably want =owner or =none here
 TB_SEND_MAIL=all
 
-# TB_ACTIVE_PROFILES list the default lsit of profile to use for tb
-# in the absence of -p <profile> on the commadn line these profiles
-# will be implicitely selected
-TB_ACTIVE_PROFILES="master_gerrit lo-4-1_gerrit lo-4-1_tb daily_bibisec_upload_master_tb"
+# TB_ACTIVE_PROFILES list the default profiles to use for tb
+# in the absence of -p <profile> on the command line. These profiles
+# will be implicitly selected.
+TB_ACTIVE_PROFILES="master_gerrit lo-4-1_gerrit lo-4-1_tb daily_bibisect_upload_master_tb"
 
 # if you are doing tb build, we need a SMTP server
 # to send email to the tinderbox server, to post
 # the build result
 # and we need a user/passwd.
 # if your smtp does not need credentials
-# then you can omit both user and passwrd
-# note email are also used to notify committer of build failure
-TB_SMTP_HOST=smtp.gamil.com
+# then you can omit both user and password
+# note email is also used to notify committer of build failure
+TB_SMTP_HOST=smtp.gmail.com
 TB_SMTP_USER=john.doe
 TB_SMTP_PASSWORD=password
 
diff --git a/tb/config-sample/profiles/master_gerrit/config b/tb/config-sample/profiles/master_gerrit/config
index 42dd99c..c24974a 100644
--- a/tb/config-sample/profiles/master_gerrit/config
+++ b/tb/config-sample/profiles/master_gerrit/config
@@ -1,8 +1,8 @@
 
-#mandatory param: indicate a gerrit build
+# mandatory param: indicate a gerrit build
 TB_TYPE=gerrit
 
-# name used for repporting
+# name used for reporting
 TB_NAME=Linux-x86_84 at 99-optional-comment
 
 # branch targeted by this profile
diff --git a/tb/install b/tb/install
index 5577638..7b18c71 100755
--- a/tb/install
+++ b/tb/install
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 
-# get the abolute path to the directory containing the main script
+# get the absolute path to the directory containing the main script
 BIN_DIR=$(dirname "$0")
 pushd ${BIN_DIR?} > /dev/null
 BIN_DIR=$(pwd)
@@ -13,8 +13,8 @@ usage()
     cat <<EOF
 Usage: $0 [ --prefix=<path> ]
 
---prefix is used here in the sens of autoconf.
-By default the prefix is /opt/lo, which means that tb and necesasry
+--prefix is used here in the sense of autoconf.
+By default the prefix is /opt/lo, which means that tb and necessary
 shell files are installed in /opt/lo/bin
 
 EOF
diff --git a/tb/tb b/tb/tb
index 4fbae7a..46685cc 100755
--- a/tb/tb
+++ b/tb/tb
@@ -15,7 +15,7 @@ if [ -n "$debug" ] ; then
     set -x
 fi
 
-# get the abolute path to the directory containing the main script
+# get the absolute path to the directory containing the main script
 tb_BIN_DIR=$(dirname "$0")
 pushd ${tb_BIN_DIR} > /dev/null
 tb_BIN_DIR=$(pwd)
@@ -47,13 +47,12 @@ when such a task is found, tb checkout the patch concerned, test build it and
 report the result to gerrit.
 
 In 'dual' mode, tb alternate between the tb and gerrit mode. In dual mode
-there is 3 diffrent scheduling mode:
-The 'fair' mode, which try  tb and gerrit
-build alternatively.
+there are 3 different scheduling modes:
+The 'fair' mode, which tries tb and gerrit build alternatively.
 The tb-gerrit mode, in which tb does primarily tb build unless there is no such
 build to do, in which case it does gerrit build until a new tb build is needed
 The gerrit-tb mode, in which tb does primarily gerrit build unless there is no
-ssuch build to do, in which case it does tb build until a new gerrit build is
+such build to do, in which case it does tb build until a new gerrit build is
 needed.
 
 tb can only run any number of profile at the time.
@@ -70,10 +69,10 @@ The configuration is organized as:
 
 The configuration is obtained for a given profile by sourcing, in this order,
 
-~/tb/config
+~/.tb/config
     /profiles/<profile_name>/config
 
-Each build need a autogen configuration for the building of libreoffice.
+Each build needs an autogen configuration for the building of libreoffice.
 
     /profiles/<profile_name>/autogen.lastrun
 
@@ -87,30 +86,29 @@ The following variables can be specified in tb's configuration files.
 TB_ACTIVE_PROFILES=<profile_name> [<profile_name> ...]
                                   List of active profile.
                                   This is a G level only parameter
-                                  This provide a default value in case -p <profle> is not
+                                  This provide a default value in case -p <profile> is not
                                   present on the command line, but is required.
 TB_BIBISECT_DIR=<path> Location of a git bibisect repository
-                       This is a tb-mode only paramter. This is ingored in gerrit mode
-                       This is a tb-mode only paramter. This is ingored in gerrit mode
+                       This is a tb-mode only parameter. This is ignored in gerrit mode
 TB_BIBISECT_GC=[0|1] Indicate if a git gc should be run after each bibisect version
                      is stored
                      Default is 0.
-                     This is a tb-mode only paramter. This is ingored in gerrit mode
+                     This is a tb-mode only parameter. This is ignored in gerrit mode
 TB_BIBISECT_PUSH=[0|1] Indicate if a git push should be issued after each bibisect
                        version is stored.
                        Default is 0.
-                       This is a tb-mode only paramter. This is ingored in gerrit mode
+                       This is a tb-mode only parameter. This is ignored in gerrit mode
 TB_BIBISECT=[0|1] Indicate if a bibisect version should be saved.
                   Default is 0.
-                  This is a tb-mode only paramter. This is ingored in gerrit mode
-TB_BRANCH=<nane>  name of the branch that profile monitor, used to query gerrit or to repport to tindbuild
+                  This is a tb-mode only parameter. This is ignored in gerrit mode
+TB_BRANCH=<name>  name of the branch that profile monitor, used to query gerrit or to report to tinbuild
                   Default:"master"
-TB_BUILD_DIR=<path> Directory to use a a build directory. If specified, it must exist.
+TB_BUILD_DIR=<path> Directory to use as a build directory. If specified, it must exist.
                     Default to TB_GIT_DIR.
-TB_LOCAL_REFSPEC=<ref> Name of the branche in the local repo
+TB_LOCAL_REFSPEC=<ref> Name of the branch in the local repo
                        Default to the name of the branch in the configuration
-                       This is a P-level only paramter
-                       This is a tb-mode only paramter. This is ingored in gerrit mode
+                       This is a P-level only parameter
+                       This is a tb-mode only parameter. This is ignored in gerrit mode
 TB_MODE=(fair|fix)  Indicate the scheduling fairness to use
                     This is a G only parameter
                     in 'fair' mode active profiles are rotated such that
@@ -119,8 +117,8 @@ TB_MODE=(fair|fix)  Indicate the scheduling fairness to use
                     in the order they are specified, always.
 TB_REMOTE_REFSPEC=<ref> Name of the branch on the remote repo.
                         Default to the name of the branch in the configuration
-                        This is a P-level only paramter
-                        This is a tb-mode only paramter. This is ingored in gerrit mode
+                        This is a P-level only parameter
+                        This is a tb-mode only parameter. This is ignored in gerrit mode
 TB_TYPE=(gerrit|tb) Indicate if the profile describe a gerrit or tb build
                     This is a mandatory P-level only parameter
 TB_GERRIT_HOST=<host> Gerrit host to contact in gerrit mode.
@@ -130,63 +128,63 @@ TB_GERRIT_TEST=(1|0) Indicate that this gerrit profile is for test only.
                      as 'test'. and therefore will not be consumed as real request.
 TB_GIT_DIR=<path> Location of the libreoffice core git repo to use for a build.
                   This parameter is mandatory.
-TB_INCREMENTAL=[0|1] Indicate that one want to do incremental build, iow skip the clean phase
-                     This apply only to tb build, as tb build are normally progressive
-                     in time, whereas gerrit build can be all over the place...
-                     This only make sens if each branch that is meant to be built incrementally
-                     has it's own build directory (which for now also mean its own git repo
-                     at least until gbuildification is complete and the source tree is finaly
+TB_INCREMENTAL=[0|1] Indicate that one wants to do incremental build, iow skip the clean phase
+                     This apply only to tb build, as tb builds are normally progressive
+                     in time, whereas gerrit builds can be all over the place...
+                     This only make sense if each branch that is meant to be built incrementally
+                     has its own build directory (which for now also mean its own git repo
+                     at least until gbuildification is complete and the source tree is finally
                      treated as a read-only zone.
-TB_LOGFILE=<path> File where tb will log message about it's operation.
+TB_LOGFILE=<path> File where tb will log message about its operation.
                   The file does not have to exist, but the path containing the file must.
                   This is only for message issued by tb itself.. this does no relate to build
                   logs.
-TB_MATADATA_DIR<path> directory where tb will store state information regarding the defferent
-                      branches it monitor. In tb mode, tb is keeping track of the last
-                      sucessfull build point, in order to be able to notify the committers
+TB_METADATA_DIR=<path> Directory where tb will store state information regarding the different
+                      branches it monitors. In tb mode, tb is keeping track of the last
+                      successful build point, in order to be able to notify the committers
                       involved in patches since that point in case of build failure.
-                      tb also keep track of the last time it uploaded a version
+                      tb also keeps track of the last time it uploaded a version
                       when such upload options is specified.
                       All the files used to keep track of theses are store in this directory,
                       tb will attempt to create the directory if it does not exist
-                      This is G or P-level parameter only
-                      This paramter is mandatory.
+                      This is G or P-level parameter only.
+                      This parameter is mandatory.
 TB_NAME=<name> Name of the tinderbox. see http://wiki/documentfoundation.org/Development/Tinderbox
                for naming conventions.
                This is G or P-level parameter only
-               This paramter is mandatory.
+               This parameter is mandatory.
 TB_NICE=<prefix> Value to prepend to expensive command like MAKE to nice it
-                 for eacmpel TB_NICE="nice ionice -c3"
+                 for example TB_NICE="nice ionice -c3"
 TB_OWNER=<email> Email of the owner/operator of the tinderbox
-                 This is G or P-level parameter only
-                 This paramter is mandatory.
-TB_POLL_DELAY=<num_of_seconds> Delay in second between two attempt to pool the states of branches.
+                 This is G or P-level parameter only.
+                 This parameter is mandatory.
+TB_POLL_DELAY=<num_of_seconds> Delay in second between two attempts to pool the states of branches.
 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
+                             This parameter 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
+                            This parameter is mandatory if TB_SMTP_USER is specified
 TB_SMTP_USER=<username> Username to login to the smtp server.
-                        If your smtp server does not require authotification, you can omit this.
-TB_TINDERBOX_BRANCH=<name> Name associated with a  branch on the tinderbox server.
-                           The tinderbox server need to have a branch name assocaited with any
-                           build repport. the server only recognize a preset list of such name
-                           and they do not necessarely match you local branch name.
-                           This is a tb-mode only paramter. This is ignored in gerrit mode
+                        If your smtp server does not require authentication, you can omit this.
+TB_TINDERBOX_BRANCH=<name> Name associated with a branch on the tinderbox server.
+                           The tinderbox server need to have a branch name associated with any
+                           build report. The server only recognize a preset list of such names
+                           and they do not necessarily match your local branch names.
+                           This is a tb-mode only parameter. This is ignored in gerrit mode.
 TB_TRIGGER_FILE=<absolute_filename> This is the location of a 'trigger' file.
-                                    If specified the existance of that file will be
-                                    tested, and a build for the assocaited branch
-                                    will not be run unless the file exist
-                                    at the end of a successfull build, the trigger
+                                    If specified the existence of that file will be
+                                    tested, and a build for the associated branch
+                                    will not be run unless the file exists.
+                                    At the end of a successful build, the trigger
                                     file is removed by tb.
-                                    This allow to trigger some build at periodic time with a cron
+                                    This allows to trigger some build at periodic time with a cron
                                     For instance you could have a cron that touch a trigger file
                                     weekly to trigger a full localized build.
                                     This is a tb-mode only parameter. This is ignored in gerrit mode
 
-In general, when a command line argument influence on of the paramter listed
+In general, when a command line argument influence on of the parameter listed
 above, it can only override a G-level specification. P-level take, for the most
 part precedence of the command-line.
 
@@ -195,7 +193,7 @@ taking no argument what-so-ever.
 
 
 Note for tinbuild2 user: tb does _not_ require a primer build. but it will not
-send email to committers in case a failure until it has had a prior sucessful
+send email to committers in case a failure until it has had a prior successful
 build for a given branch.
 
 EOF
@@ -242,7 +240,7 @@ while [ "${1}" != "" ]; do
         -k)  # do not override the local autogen.lastrun if present
             tb_KEEP_AUTOGEN="1"
             ;;
-        -p)  # profile to use to deterine extra parameter (email mostly) and autogen arguments
+        -p)  # profile to use to determine extra parameters (email mostly) and autogen arguments
             if [ -z "${has_arg}" ] ; then
                 shift;
                 arg="$1"
diff --git a/tb/tb_internals.sh b/tb/tb_internals.sh
index f2d88b2..784a0a3 100644
--- a/tb/tb_internals.sh
+++ b/tb/tb_internals.sh
@@ -18,25 +18,25 @@
 # Exception: P : current project name
 #            R : build result indicator ( 0=OK 1=KO 2=False positive )
 #            V : verbose messages (V=1 => verbose message V= => no verbose message, iow: [ $V ] && log_msgs ....
-#         MAKE : environement variable is use if set to point to a gnu-make
-#                otherwise overriden to a gne-make found in the PATH
+#         MAKE : environment variable is use if set to point to a gnu-make
+#                otherwise overridden to a gnu-make found in the PATH
 #
-# canonical_* reserverved for phase implementation in tb_phases.sh
-# canonical_[pre|do|post]_<phase> is garanteed to exist, even if it is a no-op function.
+# canonical_* reserved for phase implementation in tb_phases.sh
+# canonical_[pre|do|post]_<phase> is guaranteed to exist, even if it is a no-op function.
 #
 # The rational for these namespace is to allow lower-level overload to still call
 # the implementation at higher level.
 #
-# for instance if a profile phase.sh want derefine the TMPDIR and clean it up
-# in the pre-clean phase, but still want to do what-ever the tb_phase.sh normally do
+# for instance if a profile phase.sh wants to redefine the TMPDIR and clean it up
+# in the pre-clean phase, but still wants to do whatever the tb_phase.sh normally do
 # it can implement
 # pre_clean()
 # {
 #    do what I need to do
-#    canonical_pre_clean() to invoke the defautl impelmentation
+#    canonical_pre_clean() to invoke the default implementation
 # }
 #
-# ATTENTION: do not abuse this scheme by having defferent level invoking different phase
+# ATTENTION: do not abuse this scheme by having different level invoking different phase
 # at higher level... so a profile's pre_clean() for instance shall not invoke canonical_do_clean()
 # or any other phase than *_pre_clean()
 #
@@ -61,7 +61,7 @@ V=
 tb_LOGFILE="/dev/null"
 
 
-# please keep the function declaration in alphabetical order
+# please keep the function declarations in alphabetical order
 
 
 bibisect_post()
@@ -90,7 +90,7 @@ collect_current_head()
 # Copy the autogen.lastrun in the builddir
 # this assume that the cwd is the builddir
 # and that B and tb_BUILD_TYPE are set
-# This is notmally called fromthe do_autogen()
+# This is normally called from the do_autogen()
 # phase.
 #
 copy_autogen_config()
@@ -105,7 +105,7 @@ copy_autogen_config()
 deliver_lo_to_bibisect()
 {
     # copy the content of lo proper to bibisect
-    # this is  separate function so it can easily be overriden
+    # this is  separate function so it can easily be overridden
     cp -fR ${tb_OPT_DIR?} ${TB_BIBISECT_DIR?}/
 
 }
@@ -317,7 +317,7 @@ get_committers()
     get_commits_since_last_good people | sort | uniq | tr '\n' ','
 }
 
-interupted_build()
+interrupted_build()
 {
     log_msgs "Interrupted by Signal"
     if [ "$TB_MODE" = "gerrit" ] ; then
@@ -513,7 +513,7 @@ push_bibisect()
 
     if [ ${TB_BIBISECT} = "1" -a -n "${tb_OPT_DIR}" ] ; then
 
-        [ $V ] && echo "Push: bibisec builds enabled"
+        [ $V ] && echo "Push: bibisect builds enabled"
         curr_day=$(date -u '+%Y%j')
         last_day_upload="$(cat "${TB_METADATA_DIR?}/${P?}_last-bibisect-day.txt" 2>/dev/null)"
         if [ -z "$last_day_upload" ] ; then
@@ -535,7 +535,7 @@ push_bibisect()
     fi
 }
 
-# Add pdb files for binaries of the given extension (exe,dll)
+# Add pdb files for binaries of the given extension (exe, dll)
 # and type (Library/Executable) to the given list.
 add_pdb_files()
 {
@@ -855,7 +855,7 @@ rotate_logs()
     if [ "${R?}" = "0" ] ; then
         cp -f "${TB_METADATA_DIR?}/${P?}_current-git-head.log" "${TB_METADATA_DIR?}/${P?}_last-success-git-head.txt" 2>/dev/null
         cp -f "${TB_METADATA_DIR?}/${P?}_current-git-timestamp.log" "${TB_METADATA_DIR?}/${P?}_last-success-git-timestamp.txt" 2>/dev/null
-    elif [ "${R}" != "2" ]; then # do not count abandonned false_negative loop as failure
+    elif [ "${R}" != "2" ]; then # do not count abandoned false_negative loop as failure
         cp -f "${TB_METADATA_DIR?}/${P?}_current-git-head.log" "${TB_METADATA_DIR?}/${P?}_last-failure-git-head.txt" 2>/dev/null
         cp -f "${TB_METADATA_DIR?}/${P?}_current-git-timestamp.log" "${TB_METADATA_DIR?}/${P?}_last-failure-git-timestamp.txt" 2>/dev/null
     fi
@@ -873,7 +873,7 @@ rotate_logs()
 #
 # Run a gerrit build
 #
-# Run a a subshell to isolate Branch-level config
+# Run a subshell to isolate Branch-level config
 #
 run_gerrit_task()
 {
@@ -883,9 +883,9 @@ run_gerrit_task()
     # branch and checkout the target sha
     prepare_git_repo_for_gerrit
 
-    # if prepare repor failed R is no 0 anymore
+    # if prepare report failed R is no 0 anymore
     if [ "${R}" == 0 ] ; then
-        # gerrit build are not incremental
+        # gerrit builds are not incremental
         # always use all the phases and cleanup after yourself
         local phase_list="autogen clean make test push clean"
 
@@ -924,7 +924,7 @@ local s=0
         # based on the build type run the appropriate build
         if [ -z "${P?}" ] ; then
             if [ "${s?}" != "${TB_POLL_DELAY?}" ] ; then
-                log_msgs "Nothing to do. waiting ${TB_POLL_DELAY?} seconds."
+                log_msgs "Nothing to do. Waiting ${TB_POLL_DELAY?} seconds."
             fi
             s=${TB_POLL_DELAY?}
         else
@@ -935,7 +935,7 @@ local s=0
     # if we were stopped by request, let's log that
     # clean the semaphore file
     if [ -f ${tb_CONFIG_DIR?}/stop ] ; then
-        log_msgs "Stoped by request"
+        log_msgs "Stopped by request"
         rm ${tb_CONFIG_DIR?}/stop
     fi
 
@@ -970,7 +970,7 @@ run_primer()
         (
         local triggered=0
         R=0
-        trap 'interupted_build' SIGINT SIGQUIT
+        trap 'interrupted_build' SIGINT SIGQUIT
         load_profile "${P?}"
 
         # we do not want to send any email on 'primer/one-shot' build
@@ -1062,7 +1062,7 @@ select_next_gerrit_task()
     local has_task
     local r=0
 
-    # short-cut triiger based build
+    # short-cut trigger based build
     if [ -n "${TB_TRIGGER_FILE}" ] ; then
         if [ ! -f "${TB_TRIGGER_FILE}" ] ; then
             R=3
@@ -1120,12 +1120,12 @@ select_next_task()
 
 #
 # Select a Tinderbox task
-# by seraching for new commits
-# on on of the branches under consideration
+# by searching for new commits
+# on one of the branches under consideration
 #
 select_next_tb_task()
 {
-    # short-cut triiger based build
+    # short-cut trigger based build
     if [ -n "${TB_TRIGGER_FILE}" ] ; then
         if [ ! -f "${TB_TRIGGER_FILE}" ] ; then
             R=3
@@ -1213,7 +1213,7 @@ send_mail_msg()
 # Setup factory default for variables
 #
 # this is invoked before the profile is known
-# so it cannot be overriden in the profile's phases.sh
+# so it cannot be overridden in the profile's phases.sh
 #
 set_factory_default()
 {
@@ -1238,8 +1238,8 @@ set_factory_default()
 # Setup default at the global level
 #
 # Based on the content of the profile
-# setup some interna variable
-# assign some default and
+# setup some internal variables
+# assign some defaults and
 # do some other housekeeping
 #
 # Verify that mandatory profile
@@ -1284,7 +1284,7 @@ try_run_task()
     (
         local triggered=0
         R=0
-        trap 'interupted_build' SIGINT SIGQUIT
+        trap 'interrupted_build' SIGINT SIGQUIT
         load_profile "${P?}"
 
         pushd "${TB_GIT_DIR?}" > /dev/null || die "Cannot cd to git repo ${TB_GIT_DIR?} for profile ${P?}"
@@ -1320,7 +1320,7 @@ try_run_task()
         exit "$R"
     )
     R="$?"
-    # check we we intercepted a signal, if so bail
+    # check if we intercepted a signal, if so bail
     if [ "${R?}" = "4" ] ; then
         exit -1
     fi
@@ -1435,7 +1435,7 @@ validate_tb_profile()
     fi
     if [ -n "$TB_BUILD_DIR" ] ; then
         if [ ! -d "${TB_BUILD_DIR}" ] ; then
-            die "TB_BULD_DIR:${TB_BUILD_DIR?} is not a directory"
+            die "TB_BUILD_DIR:${TB_BUILD_DIR?} is not a directory"
         fi
     fi
 
@@ -1474,7 +1474,7 @@ fi
 
 ################
 # ATTENTION:
-# Nothing below this point can be overriden at the platform-level
+# Nothing below this point can be overridden at the platform-level
 # so you should probably add code above this point
 # unless you have a darn good reason not to
 
diff --git a/tb/tb_phases.sh b/tb/tb_phases.sh
index e224ad5..dcca27b 100644
--- a/tb/tb_phases.sh
+++ b/tb/tb_phases.sh
@@ -51,7 +51,7 @@ do_autogen()
     canonical_do_autogen
 }
 
-canoncial_post_autogen()
+canonical_post_autogen()
 {
     return
 }
@@ -95,7 +95,7 @@ local optdir=""
 
     tb_OPT_DIR=""
     if [ "${R}" = "0" ] ; then
-        # we for MAKE_RESTARTS=1 because 1/ we know thta Makefile is up to date
+        # we force MAKE_RESTARTS=1 because 1/ we know that Makefile is up to date
         # and 2/ the 'restart' mechanism in make is messed-up by the fact that we trap SIGINT
         if ! ${TB_NICE} ${TB_WATCHDOG} ${MAKE?} MAKE_RESTARTS=1  -sr $tb_MAKE_EXTRA_OPT > "tb_${P?}_build.log" 2>&1 ; then
             tb_REPORT_LOG="tb_${P?}_build.log"
diff --git a/tb/tb_send_email b/tb/tb_send_email
index 8785c1b..f466cfe 100755
--- a/tb/tb_send_email
+++ b/tb/tb_send_email
@@ -53,12 +53,12 @@ my %conf = (
     "hostname"             => 'changeme',                          ## Used in printmsg() for all output (is updated later in the script).
     "debug"                => 0,                                   ## Default debug level
     "error"                => '',                                  ## Error messages will often be stored here
-    
+
     ## Logging
     "stdout"               => 1,
     "logging"              => 0,                                   ## If this is true the printmsg function prints to the log file
     "logFile"              => '',                                  ## If this is specified (form the command line via -l) this file will be used for logging.
-    
+
     ## Network
     "server"               => 'localhost',                         ## Default SMTP server
     "port"                 => 25,                                  ## Default port
@@ -66,12 +66,12 @@ my %conf = (
     "alarm"                => '',                                  ## Default timeout for connects and reads, this gets set from $opt{'timeout'}
     "tls_client"           => 0,                                   ## If TLS is supported by the client (us)
     "tls_server"           => 0,                                   ## If TLS is supported by the remote SMTP server
-    
+
     ## Email
     "delimiter"            => "----MIME delimiter for sendEmail-"  ## MIME Delimiter
                               . rand(1000000),                     ## Add some randomness to the delimiter
     "Message-ID"           => rand(1000000) . "-sendEmail",        ## Message-ID for email header
-    
+
 );
 
 
@@ -79,23 +79,23 @@ my %conf = (
 my %opt = (
     ## Addressing
     "reply-to"             => '',                                  ## Reply-To field
-    
+
     ## Message
     "message-file"         => '',                                  ## File to read message body from
     "message-header"       => '',                                  ## Additional email header line(s)
     "message-format"       => 'normal',                            ## If "raw" is specified the message is sent unmodified
     "message-charset"      => 'iso-8859-1',                        ## Message character-set
     "message-content-type" => 'auto',                              ## auto, text, html or an actual string to put into the content-type header.
-    
+
     ## Network
     "timeout"              => 200,                                 ## Default timeout for connects and reads, this is copied to $conf{'alarm'} later.
     "fqdn"                 => 'changeme',                          ## FQDN of this machine, used during SMTP communication (is updated later in the script).
-    
+
     ## eSMTP
     "username"             => '',                                  ## Username used in SMTP Auth
     "password"             => '',                                  ## Password used in SMTP Auth
     "tls"                  => 'auto',                              ## Enable or disable TLS support.  Options: auto, yes, no
-    
+
 );
 
 ## More variables used later in the program
@@ -147,35 +147,35 @@ else    { $conf{'tls_client'} = 1; }
 
 ###############################################################################################
 ##  Function: initialize ()
-##  
+##
 ##  Does all the script startup jibberish.
-##  
+##
 ###############################################################################################
 sub initialize {
 
-    ## Set STDOUT to flush immediatly after each print  
+    ## Set STDOUT to flush immediately after each print
     $| = 1;
-    
+
     ## Intercept signals
     $SIG{'QUIT'}  = sub { quit("EXITING: Received SIG$_[0]", 1); };
     $SIG{'INT'}   = sub { quit("EXITING: Received SIG$_[0]", 1); };
     $SIG{'KILL'}  = sub { quit("EXITING: Received SIG$_[0]", 1); };
     $SIG{'TERM'}  = sub { quit("EXITING: Received SIG$_[0]", 1); };
-  
+
     ## ALARM and HUP signals are not supported in Win32
     unless ($^O =~ /win/i) {
         $SIG{'HUP'}   = sub { quit("EXITING: Received SIG$_[0]", 1); };
         $SIG{'ALRM'}  = sub { quit("EXITING: Received SIG$_[0]", 1); };
     }
-    
+
     ## Fixup $conf{'programName'}
     $conf{'programName'} =~ s/(.)*[\/,\\]//;
     $0 = $conf{'programName'} . " " . join(" ", @ARGV);
-    
+
     ## Fixup $conf{'hostname'} and $opt{'fqdn'}
     if ($opt{'fqdn'} eq 'changeme') { $opt{'fqdn'} = get_hostname(1); }
     if ($conf{'hostname'} eq 'changeme') { $conf{'hostname'} = $opt{'fqdn'}; $conf{'hostname'} =~ s/\..*//; }
-    
+
     return(1);
 }
 
@@ -195,32 +195,32 @@ sub initialize {
 
 ###############################################################################################
 ##  Function: processCommandLine ()
-##  
+##
 ##  Processes command line storing important data in global vars (usually %conf)
-##  
+##
 ###############################################################################################
 sub processCommandLine {
-    
-    
+
+
     ############################
     ##  Process command line  ##
     ############################
-    
+
     my @ARGS = @ARGV;  ## This is so later we can re-parse the command line args later if we need to
     my $numargv = @ARGS;
     help() unless ($numargv);
     my $counter = 0;
-    
+
     for ($counter = 0; $counter < $numargv; $counter++) {
-  
+
         if ($ARGS[$counter] =~ /^-h$/i) {                    ## Help ##
             help();
         }
-        
+
         elsif ($ARGS[$counter] eq "") {                      ## Ignore null arguments
             ## Do nothing
         }
-        
+
         elsif ($ARGS[$counter] =~ /^--help/) {               ## Topical Help ##
             $counter++;
             if ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) {
@@ -230,12 +230,12 @@ sub processCommandLine {
                 help();
             }
         }
-        
+
         elsif ($ARGS[$counter] =~ /^-o$/i) {                 ## Options specified with -o ##
             $counter++;
             ## Loop through each option passed after the -o
             while ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) {
-                
+
                 if ($ARGS[$counter] !~ /(\S+)=(\S.*)/) {
                     printmsg("WARNING => Name/Value pair [$ARGS[$counter]] is not properly formatted", 0);
                     printmsg("WARNING => Arguments proceeding -o should be in the form of \"name=value\"", 0);
@@ -258,13 +258,13 @@ sub processCommandLine {
                 $counter++;
             }   $counter--;
         }
-        
+
         elsif ($ARGS[$counter] =~ /^-f$/) {                  ## From ##
             $counter++;
             if ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) { $from = $ARGS[$counter]; }
             else { printmsg("WARNING => The argument after -f was not an email address!", 0); $counter--; }
         }
-        
+
         elsif ($ARGS[$counter] =~ /^-t$/) {                  ## To ##
             $counter++;
             while ($ARGS[$counter] && ($ARGS[$counter] !~ /^-/)) {
@@ -277,7 +277,7 @@ sub processCommandLine {
                 $counter++;
             }   $counter--;
         }
-        
+
         elsif ($ARGS[$counter] =~ /^-cc$/) {                 ## Cc ##
             $counter++;
             while ($ARGS[$counter] && ($ARGS[$counter] !~ /^-/)) {
@@ -290,7 +290,7 @@ sub processCommandLine {
                 $counter++;
             }   $counter--;
         }
-        
+
         elsif ($ARGS[$counter] =~ /^-bcc$/) {                ## Bcc ##
             $counter++;
             while ($ARGS[$counter] && ($ARGS[$counter] !~ /^-/)) {
@@ -303,7 +303,7 @@ sub processCommandLine {
                 $counter++;
             }   $counter--;
         }
-        
+
         elsif ($ARGS[$counter] =~ /^-m$/) {                  ## Message ##
             $counter++;
             $message = "";
@@ -312,12 +312,12 @@ sub processCommandLine {
                 $message .= $ARGS[$counter];
                 $counter++;
             }   $counter--;
-            
+
             ## Replace '\n' with $CRLF.
             ## This allows newlines with messages sent on the command line
             $message =~ s/\\n/$CRLF/g;
         }
-        
+
         elsif ($ARGS[$counter] =~ /^-u$/) {                  ## Subject ##
             $counter++;
             $subject = "";
@@ -327,7 +327,7 @@ sub processCommandLine {
                 $counter++;
             }   $counter--;
         }
-        
+
         elsif ($ARGS[$counter] =~ /^-s$/) {                  ## Server ##
             $counter++;
             if ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) {
@@ -346,7 +346,7 @@ sub processCommandLine {
             }
             else { printmsg("WARNING - The argument after -b was not the bindaddr!", 0); $counter--; }
         }
-        
+
         elsif ($ARGS[$counter] =~ /^-a$/) {                  ## Attachments ##
             $counter++;
             while ($ARGS[$counter] && ($ARGS[$counter] !~ /^-/)) {
@@ -354,7 +354,7 @@ sub processCommandLine {
                 $counter++;
             }   $counter--;
         }
-        
+
         elsif ($ARGS[$counter] =~ /^-xu$/) {                  ## AuthSMTP Username ##
             $counter++;
             if ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) {
@@ -365,7 +365,7 @@ sub processCommandLine {
                 $counter--;
             }
         }
-        
+
         elsif ($ARGS[$counter] =~ /^-xp$/) {                  ## AuthSMTP Password ##
             $counter++;
             if ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) {
@@ -376,28 +376,28 @@ sub processCommandLine {
                 $counter--;
             }
         }
-        
+
         elsif ($ARGS[$counter] =~ /^-l$/) {                  ## Logging ##
             $counter++;
             $conf{'logging'} = 1;
             if ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) { $conf{'logFile'} = $ARGS[$counter]; }
             else { printmsg("WARNING - The argument after -l was not the log file!", 0); $counter--; }
         }
-        
+
         elsif ($ARGS[$counter] =~ s/^-v+//i) {               ## Verbosity ##
             my $tmp = (length($&) - 1);
             $conf{'debug'} += $tmp;
         }
-        
+
         elsif ($ARGS[$counter] =~ /^-q$/) {                  ## Quiet ##
             $conf{'stdout'} = 0;
         }
-        
+
         else {
             printmsg("Error: \"$ARGS[$counter]\" is not a recognized option!", 0);
             help();
         }
-        
+
     }
 
 
@@ -405,18 +405,18 @@ sub processCommandLine {
 
 
 
-    
-    
+
+
     ###################################################
     ##  Verify required variables are set correctly  ##
     ###################################################
-    
+
     ## Make sure we have something in $conf{hostname} and $opt{fqdn}
     if ($opt{'fqdn'} =~ /\./) {
         $conf{'hostname'} = $opt{'fqdn'};
         $conf{'hostname'} =~ s/\..*//;
     }
-    
+
     if (!$conf{'server'}) { $conf{'server'} = 'localhost'; }
     if (!$conf{'port'})   { $conf{'port'} = 25; }
     if (!$from) {
@@ -425,7 +425,7 @@ sub processCommandLine {
     if ( ((scalar(@to)) + (scalar(@cc)) + (scalar(@bcc))) <= 0) {
         quit("ERROR => You must specify at least one recipient via -t, -cc, or -bcc", 1);
     }
-    
+
     ## Make sure email addresses look OK.
     foreach my $addr (@to, @cc, @bcc, $from, $opt{'reply-to'}) {
         if ($addr) {
@@ -436,7 +436,7 @@ sub processCommandLine {
             }
         }
     }
-    
+
     ## Make sure all attachments exist.
     foreach my $file (@attachments) {
         if ( (! -f $file) or (! -r $file) ) {
@@ -445,15 +445,15 @@ sub processCommandLine {
             quit("", 1);
         }
     }
-    
+
     if ($conf{'logging'} and (!$conf{'logFile'})) {
         quit("ERROR => You used -l to enable logging but didn't specify a log file!", 1);
-    }    
-    
+    }
+
     if ( $opt{'username'} ) {
         if (!$opt{'password'}) {
             ## Prompt for a password since one wasn't specified with the -xp option.
-            $SIG{'ALRM'} = sub { quit("ERROR => Timeout waiting for password inpupt", 1); };
+            $SIG{'ALRM'} = sub { quit("ERROR => Timeout waiting for password input", 1); };
             alarm(60) if ($^O !~ /win/i);  ## alarm() doesn't work in win32
             print "Password: ";
             $opt{'password'} = <STDIN>; chomp $opt{'password'};
@@ -462,18 +462,18 @@ sub processCommandLine {
             }
         }
     }
-    
+
     ## Validate the TLS setting
     $opt{'tls'} = lc($opt{'tls'});
     if ($opt{'tls'} !~ /^(auto|yes|no)$/) {
         quit("ERROR => Invalid TLS setting ($opt{'tls'}). Must be one of auto, yes, or no.", 1);
     }
-    
+
     ## If TLS is set to "yes", make sure sendEmail loaded the libraries needed.
     if ($opt{'tls'} eq 'yes' and $conf{'tls_client'} == 0) {
         quit("ERROR => No TLS support!  SendEmail can't load required libraries. (try installing Net::SSLeay and IO::Socket::SSL)", 1);
     }
-    
+
     ## Return 0 errors
     return(0);
 }
@@ -533,51 +533,51 @@ sub getResponse {
 ##               be sent to the server, but a valid response is still required from the server.
 ##
 ##  Input:       [$command]          A (optional) valid SMTP command (ex. "HELO")
-##  
-##  
-##  Output:      Returns zero on success, or non-zero on error.  
+##
+##
+##  Output:      Returns zero on success, or non-zero on error.
 ##               Error messages will be stored in $conf{'error'}
 ##               A copy of the last SMTP response is stored in the global variable
 ##               $conf{'SMTPchat_response'}
-##               
-##  
+##
+##
 ##  Example:     SMTPchat ("HELO mail.isp.net");
 ###############################################################################################
 sub SMTPchat {
     my ($command) = @_;
-    
+
     printmsg("INFO => Sending: \t$command", 1) if ($command);
-    
+
     ## Send our command
     print $SERVER "$command$CRLF" if ($command);
-    
+
     ## Read a response from the server
     $SIG{'ALRM'} = sub { $conf{'error'} = "alarm"; $SERVER->close(); };
     alarm($conf{'alarm'}) if ($^O !~ /win/i);  ## alarm() doesn't work in win32;
-    my $result = $conf{'SMTPchat_response'} = getResponse(\$SERVER); 
+    my $result = $conf{'SMTPchat_response'} = getResponse(\$SERVER);
     alarm(0) if ($^O !~ /win/i);  ## alarm() doesn't work in win32;
-    
+
     ## Generate an alert if we timed out
     if ($conf{'error'} eq "alarm") {
         $conf{'error'} = "ERROR => Timeout while reading from $conf{'server'}:$conf{'port'} There was no response after $conf{'alarm'} seconds.";
         return(1);
     }
-    
+
     ## Make sure the server actually responded
     if (!$result) {
         $conf{'error'} = "ERROR => $conf{'server'}:$conf{'port'} returned a zero byte response to our query.";
         return(2);
     }
-    
+
     ## Validate the response
     if (evalSMTPresponse($result)) {
         ## conf{'error'} will already be set here
         return(2);
     }
-    
-    ## Print the success messsage
+
+    ## Print the success message
     printmsg($conf{'error'}, 1);
-    
+
     ## Return Success
     return(0);
 }
@@ -598,46 +598,46 @@ sub SMTPchat {
 ##
 ##  Description: Searches $message for either an  SMTP success or error code, and returns
 ##               0 on success, and the actual error code on error.
-##               
 ##
-##  Input:       $message          Data received from a SMTP server (ex. "220 
-##                                
-##  
-##  Output:      Returns zero on success, or non-zero on error.  
+##
+##  Input:       $message          Data received from a SMTP server (ex. "220
+##
+##
+##  Output:      Returns zero on success, or non-zero on error.
 ##               Error messages will be stored in $conf{'error'}
-##               
-##  
+##
+##
 ##  Example:     SMTPchat ("HELO mail.isp.net");
 ###############################################################################################
 sub evalSMTPresponse {
     my ($message) = @_;
-    
+
     ## Validate input
-    if (!$message) { 
+    if (!$message) {
         $conf{'error'} = "ERROR => No message was passed to evalSMTPresponse().  What happened?";
         return(1)
     }
-    
+
     printmsg("DEBUG => evalSMTPresponse() - Checking for SMTP success or error status in the message: $message ", 3);
-    
+
     ## Look for a SMTP success code
     if ($message =~ /^([23]\d\d)/) {
         printmsg("DEBUG => evalSMTPresponse() - Found SMTP success code: $1", 2);
         $conf{'error'} = "SUCCESS => Received: \t$message";
         return(0);
     }
-    
+
     ## Look for a SMTP error code
     if ($message =~ /^([45]\d\d)/) {
         printmsg("DEBUG => evalSMTPresponse() - Found SMTP error code: $1", 2);
         $conf{'error'} = "ERROR => Received: \t$message";
         return($1);
     }
-    
+
     ## If no SMTP codes were found return an error of 1
     $conf{'error'} = "ERROR => Received a message with no success or error code. The message received was: $message";
     return(2);
-    
+
 }
 
 
@@ -651,7 +651,7 @@ sub evalSMTPresponse {
 
 #########################################################
 # SUB: &return_month(0,1,etc)
-#  returns the name of the month that corrosponds
+#  returns the name of the month that corresponds
 #  with the number.  returns 0 on error.
 #########################################################
 sub return_month {
@@ -688,7 +688,7 @@ sub return_month {
 
 #########################################################
 # SUB: &return_day(0,1,etc)
-#  returns the name of the day that corrosponds
+#  returns the name of the day that corresponds
 #  with the number.  returns 0 on error.
 #########################################################
 sub return_day {
@@ -721,12 +721,12 @@ sub return_day {
 ###############################################################################################
 ##  Function:    returnAddressParts(string $address)
 ##
-##  Description: Returns a two element array containing the "Name" and "Address" parts of 
+##  Description: Returns a two element array containing the "Name" and "Address" parts of
 ##               an email address.
-##  
+##
 ## Example:      "Brandon Zehm <caspian at dotconf.net>"
 ##               would return: ("Brandon Zehm", "caspian at dotconf.net");
-## 
+##
 ##               "caspian at dotconf.net"
 ##               would return: ("caspian at dotconf.net", "caspian at dotconf.net")
 ###############################################################################################
@@ -734,35 +734,35 @@ sub returnAddressParts {
     my $input = $_[0];
     my $name = "";
     my $address = "";
-    
+
     ## Make sure to fail if it looks totally invalid
     if ($input !~ /(\S+\@\S+)/) {
         $conf{'error'} = "ERROR => The address [$input] doesn't look like a valid email address, ignoring it";
         return(undef());
     }
-    
+
     ## Check 1, should find addresses like: "Brandon Zehm <caspian at dotconf.net>"
     elsif ($input =~ /^\s*(\S(.*\S)?)\s*<(\S+\@\S+)>/o) {
         ($name, $address) = ($1, $3);
     }
-    
+
     ## Otherwise if that failed, just get the address: <caspian at dotconf.net>
     elsif ($input =~ /<(\S+\@\S+)>/o) {
         $name = $address = $1;
     }
-    
+
     ## Or maybe it was formatted this way: caspian at dotconf.net
     elsif ($input =~ /(\S+\@\S+)/o) {
         $name = $address = $1;
     }
-    
+
     ## Something stupid happened, just return an error.
     unless ($name and $address) {
         printmsg("ERROR => Couldn't parse the address: $input", 0);
         printmsg("HINT => If you think this should work, consider reporting this as a bug to $conf{'authorEmail'}", 1);
         return(undef());
     }
-    
+
     ## Make sure there aren't invalid characters in the address, and return it.
     my $ctrl        = '\000-\037';
     my $nonASCII    = '\x80-\xff';
@@ -803,7 +803,7 @@ sub base64_encode {
     my $tmp = '';
     my $base64 = '';
     my $CRLF = "\r\n";
-    
+
     ###################################
     ## Convert binary data to base64 ##
     ###################################
@@ -813,7 +813,7 @@ sub base64_encode {
         $tmp =~ tr|` -_|AA-Za-z0-9+/|;     ## Translate from uuencode to base64
         $base64 .= $tmp;
     }
-    
+
     ##########################
     ## Encode the leftovers ##
     ##########################
@@ -825,7 +825,7 @@ sub base64_encode {
         $tmp =~ tr|` -_|AA-Za-z0-9+/|;             ## Translate from uuencode to base64
         $base64 .= $tmp;
     }
-    
+
     ############################
     ## Fix padding at the end ##
     ############################
@@ -839,7 +839,7 @@ sub base64_encode {
     else {
         $data = $base64;
     }
-    
+
     ## Remove any trailing CRLF's
     $data =~ s/(\r|\n)*$//s;
     return($data);
@@ -863,18 +863,18 @@ sub send_attachment {
     my (@fields, $y, $filename_name, $encoding,      ## Local variables
         @attachlines, $content_type);
     my $bin = 1;
-    
-    @fields = split(/\/|\\/, $filename);             ## Get the actual filename without the path  
-    $filename_name = pop(@fields);       
+
+    @fields = split(/\/|\\/, $filename);             ## Get the actual filename without the path
+    $filename_name = pop(@fields);
     push @attachments_names, $filename_name;         ## FIXME: This is only used later for putting in the log file
-    
+
     ##########################
     ## Autodetect Mime Type ##
     ##########################
-    
+
     @fields = split(/\./, $filename_name);
     $encoding = $fields[$#fields];
-    
+
     if ($encoding =~ /txt|text|log|conf|^c$|cpp|^h$|inc|m3u/i) {   $content_type = 'text/plain';                      }
     elsif ($encoding =~ /html|htm|shtml|shtm|asp|php|cfm/i) {      $content_type = 'text/html';                       }
     elsif ($encoding =~ /sh$/i) {                                  $content_type = 'application/x-sh';                }
@@ -910,16 +910,16 @@ sub send_attachment {
     elsif ($encoding =~ /latex/i) {                                $content_type = 'application/x-latex';             }
     elsif ($encoding =~ /vcf/i) {                                  $content_type = 'application/x-vcard';             }
     else { $content_type = 'application/octet-stream';  }
-  
-  
+
+
   ############################
   ## Process the attachment ##
   ############################
-    
+
     #####################################
     ## Generate and print MIME headers ##
     #####################################
-    
+
     $y  = "$CRLF--$conf{'delimiter'}$CRLF";
     $y .= "Content-Type: $content_type;$CRLF";
     $y .= "        name=\"$filename_name\"$CRLF";
@@ -927,24 +927,24 @@ sub send_attachment {
     $y .= "Content-Disposition: attachment; filename=\"$filename_name\"$CRLF";
     $y .= "$CRLF";
     print $SERVER $y;
-    
-    
+
+
     ###########################################################
     ## Convert the file to base64 and print it to the server ##
     ###########################################################
-    
+
     open (FILETOATTACH, $filename) || do {
         printmsg("ERROR => Opening the file [$filename] for attachment failed with the error: $!", 0);
         return(1);
     };
     binmode(FILETOATTACH);                 ## Hack to make Win32 work
-    
+
     my $res = "";
     my $tmp = "";
     my $base64 = "";
     while (<FILETOATTACH>) {               ## Read a line from the (binary) file
         $res .= $_;
-        
+
         ###################################
         ## Convert binary data to base64 ##
         ###################################
@@ -954,16 +954,16 @@ sub send_attachment {
             $tmp =~ tr|` -_|AA-Za-z0-9+/|;     ## Translate from uuencode to base64
             $base64 .= $tmp;
         }
-        
+
         ################################
         ## Print chunks to the server ##
         ################################
         while ($base64 =~ s/(.{76})//s) {
             print $SERVER "$1$CRLF";
         }
-      
+
     }
-    
+
     ###################################
     ## Encode and send the leftovers ##
     ###################################
@@ -974,7 +974,7 @@ sub send_attachment {
         chop($res);
         $res =~ tr|` -_|AA-Za-z0-9+/|;          ## Translate from uuencode to base64
     }
-    
+
     ############################
     ## Fix padding at the end ##
     ############################
@@ -985,12 +985,12 @@ sub send_attachment {
             print $SERVER "$1$CRLF";
         }
     }
-    
+
     close (FILETOATTACH) || do {
         printmsg("ERROR - Closing the filehandle for file [$filename] failed with the error: $!", 0);
         return(2);
     };
-    
+
     ## Return 0 errors
     return(0);
 
@@ -1006,28 +1006,28 @@ sub send_attachment {
 
 ###############################################################################################
 ##  Function:    $string = get_hostname (boot $fqdn)
-##  
+##
 ##  Description: Tries really hard to returns the short (or FQDN) hostname of the current
 ##               system.  Uses techniques and code from the  Sys-Hostname module.
-##  
+##
 ##  Input:       $fqdn     A true value (1) will cause this function to return a FQDN hostname
 ##                         rather than a short hostname.
-##  
+##
 ##  Output:      Returns a string
 ###############################################################################################
 sub get_hostname {
     ## Assign incoming parameters to variables
     my ( $fqdn ) = @_;
     my $hostname = "";
-    
+
     ## STEP 1: Get short hostname
-    
+
     ## Load Sys::Hostname if it's available
     eval { require Sys::Hostname; };
     unless ($@) {
-        $hostname = Sys::Hostname::hostname(); 
+        $hostname = Sys::Hostname::hostname();
     }
-    
+
     ## If that didn't get us a hostname, try a few other things
     else {
         ## Windows systems
@@ -1036,44 +1036,44 @@ sub get_hostname {
             if (!$hostname) { $hostname = gethostbyname('localhost'); }
             if (!$hostname) { chomp($hostname = `hostname 2> NUL`) };
         }
-        
+
         ## Unix systems
         else {
             local $ENV{PATH} = '/usr/bin:/bin:/usr/sbin:/sbin';  ## Paranoia
-            
+
             ## Try the environment first (Help!  What other variables could/should I be checking here?)
             if ($ENV{'HOSTNAME'}) { $hostname = $ENV{'HOSTNAME'}; }
-            
+
             ## Try the hostname command
             eval { local $SIG{__DIE__}; local $SIG{CHLD}; $hostname = `hostname 2>/dev/null`; chomp($hostname); } ||
-            
+
             ## Try POSIX::uname(), which strictly can't be expected to be correct
             eval { local $SIG{__DIE__}; require POSIX; $hostname = (POSIX::uname())[1]; } ||
-            
+
             ## Try the uname command
             eval { local $SIG{__DIE__}; $hostname = `uname -n 2>/dev/null`; chomp($hostname); };
-            
+
         }
-        
+
         ## If we can't find anything else, return ""
         if (!$hostname) {
             print "WARNING => No hostname could be determined, please specify one with -o fqdn=FQDN option!\n";
             return("unknown");
         }
     }
-    
+
     ## Return the short hostname
     unless ($fqdn) {
         $hostname =~ s/\..*//;
         return(lc($hostname));
     }
-    
+
     ## STEP 2: Determine the FQDN
-    
+
     ## First, if we already have one return it.
     if ($hostname =~ /\w\.\w/) { return(lc($hostname)); }
-    
-    ## Next try using 
+
+    ## Next try using
     eval { $fqdn = (gethostbyname($hostname))[0]; };
     if ($fqdn) { return(lc($fqdn)); }
     return(lc($hostname));
@@ -1096,9 +1096,9 @@ sub get_hostname {
 ##  Input:       $message          A message to be printed, logged, etc.
 ##               $level            The debug level of the message. If
 ##                                 not defined 0 will be assumed.  0 is
-##                                 considered a normal message, 1 and 
+##                                 considered a normal message, 1 and
 ##                                 higher is considered a debug message.
-##  
+##
 ##  Output:      Prints to STDOUT
 ##
 ##  Assumptions: $conf{'hostname'} should be the name of the computer we're running on.
@@ -1111,33 +1111,33 @@ sub get_hostname {
 sub printmsg {
     ## Assign incoming parameters to variables
     my ( $message, $level ) = @_;
-    
+
     ## Make sure input is sane
     $level = 0 if (!defined($level));
     $message =~ s/\s+$//sgo;
     $message =~ s/\r?\n/, /sgo;
-    
+
     ## Continue only if the debug level of the program is >= message debug level.
     if ($conf{'debug'} >= $level) {
-        
+
         ## Get the date in the format: Dec  3 11:14:04
         my ($sec, $min, $hour, $mday, $mon) = localtime();
         $mon = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec')[$mon];
         my $date = sprintf("%s %02d %02d:%02d:%02d", $mon, $mday, $hour, $min, $sec);
-        
+
         ## Print to STDOUT always if debugging is enabled, or if conf{stdout} is true.
         if ( ($conf{'debug'} >= 1) or ($conf{'stdout'} == 1) ) {
             print "$date $conf{'hostname'} $conf{'programName'}\[$$\]: $message\n";
         }
-        
+
         ## Print to the log file if $conf{'logging'} is true
         if ($conf{'logFile'}) {
             if (openLogFile($conf{'logFile'})) { $conf{'logFile'} = ""; printmsg("ERROR => Opening the file [$conf{'logFile'}] for appending returned the error: $!", 1); }
             print LOGFILE "$date $conf{'hostname'} $conf{'programName'}\[$$\]: $message\n";
         }
-        
+
     }
-    
+
     ## Return 0 errors
     return(0);
 }
@@ -1156,14 +1156,14 @@ sub printmsg {
 ###############################################################################################
 ## FUNCTION:
 ##   openLogFile ( $filename )
-## 
-## 
-## DESCRIPTION: 
+##
+##
+## DESCRIPTION:
 ##   Opens the file $filename and attaches it to the filehandle "LOGFILE".  Returns 0 on success
 ##   and non-zero on failure.  Error codes are listed below, and the error message gets set in
 ##   global variable $!.
-##   
-##   
+##
+##
 ## Example:
 ##   openFile ("/var/log/sendEmail.log");
 ##
@@ -1171,7 +1171,7 @@ sub printmsg {
 sub openLogFile {
     ## Get the incoming filename
     my $filename = $_[0];
-    
+
     ## Make sure our file exists, and if the file doesn't exist then create it
     if ( ! -f $filename ) {
         print STDERR "NOTICE: The log file [$filename] does not exist.  Creating it now with mode [0600].\n" if ($conf{'stdout'});
@@ -1179,15 +1179,15 @@ sub openLogFile {
         close LOGFILE;
         chmod (0600, $filename);
     }
-    
+
     ## Now open the file and attach it to a filehandle
     open (LOGFILE,">>$filename") or return (1);
-    
+
     ## Put the file into non-buffering mode
     select LOGFILE;
     $| = 1;
     select STDOUT;
-    
+
     ## Return success
     return(0);
 }
@@ -1201,16 +1201,16 @@ sub openLogFile {
 
 ###############################################################################################
 ##  Function:    read_file (string $filename)
-##  
+##
 ##  Description: Reads the contents of a file and returns a two part array:
 ##               ($status, $file-contents)
 ##               $status is 0 on success, non-zero on error.
-##               
+##
 ##  Example:     ($status, $file) = read_file("/etc/passwd");
 ###############################################################################################
 sub read_file {
     my ( $filename ) = @_;
-    
+
     ## If the value specified is a file, load the file's contents
     if ( (-e $filename and -r $filename) ) {
         my $FILE;
@@ -1237,9 +1237,9 @@ sub read_file {
 
 ###############################################################################################
 ##  Function:    quit (string $message, int $errorLevel)
-##  
-##  Description: Exits the program, optionally printing $message.  It 
-##               returns an exit error level of $errorLevel to the 
+##
+##  Description: Exits the program, optionally printing $message.  It
+##               returns an exit error level of $errorLevel to the
 ##               system  (0 means no errors, and is assumed if empty.)
 ##
 ##  Example:     quit("Exiting program normally", 0);
@@ -1247,12 +1247,12 @@ sub read_file {
 sub quit {
     my ( $message, $errorLevel ) = @_;
     $errorLevel = 0 if (!defined($errorLevel));
-    
+
     ## Print exit message
-    if ($message) { 
+    if ($message) {
         printmsg($message, 0);
     }
-    
+
     ## Exit
     exit($errorLevel);
 }
@@ -1338,9 +1338,9 @@ exit(1);
 ###############################################################################################
 ## Function:    helpTopic ($topic)
 ##
-## Description: For all those newbies ;) 
+## Description: For all those newbies ;)
 ##              Prints a help message and exits the program.
-## 
+##
 ###############################################################################################
 sub helpTopic {
     exit(1) if (!$conf{'stdout'});
@@ -1364,17 +1364,17 @@ Options related to addressing:
     -cc  ADDRESS [ADDRESS ...]
     -bcc ADDRESS [ADDRESS ...]
     -o   reply-to=ADDRESS
-    
+
 -f ADDRESS
     This required option specifies who the email is from, I.E. the sender's
     email address.
-    
+
 -t ADDRESS [ADDRESS ...]
     This option specifies the primary recipient(s).  At least one recipient
     address must be specified via the -t, -cc. or -bcc options.
 
 -cc ADDRESS [ADDRESS ...]
-    This option specifies the "carbon copy" recipient(s).  At least one 
+    This option specifies the "carbon copy" recipient(s).  At least one
     recipient address must be specified via the -t, -cc. or -bcc options.
 
 -bcc ADDRESS [ADDRESS ...]
@@ -1384,7 +1384,7 @@ Options related to addressing:
 -o reply-to=ADDRESS
     This option specifies that an optional "Reply-To" address should be
     written in the email's headers.
-    
+
 
 ${colorGreen}Email Address Syntax${colorNormal}
 Email addresses may be specified in one of two ways:
@@ -1394,29 +1394,29 @@ Email addresses may be specified in one of two ways:
 The "Full Name" method is useful if you want a name, rather than a plain
 email address, to be displayed in the recipient's From, To, or Cc fields
 when they view the message.
-    
+
 
 ${colorGreen}Multiple Recipients${colorNormal}
 The -t, -cc, and -bcc options each accept multiple addresses.  They may be
 specified by separating them by either a white space, comma, or semi-colon
 separated list.  You may also specify the -t, -cc, and -bcc options multiple
-times, each occurance will append the new recipients to the respective list.
+times, each occurence will append the new recipients to the respective list.
 
 Examples:
 (I used "-t" in these examples, but it can be "-cc" or "-bcc" as well)
 
   * Space separated list:
     -t jane.doe\@yahoo.com "John Doe <john.doe\@gmail.com>"
-    
+
   * Semi-colon separated list:
     -t "jane.doe\@yahoo.com; John Doe <john.doe\@gmail.com>"
- 
+
   * Comma separated list:
     -t "jane.doe\@yahoo.com, John Doe <john.doe\@gmail.com>"
-  
+
   * Multiple -t, -cc, or -bcc options:
     -t "jane.doe\@yahoo.com" -t "John Doe <john.doe\@gmail.com>"
-  
+
 
 EOM
             last CASE;
@@ -1442,12 +1442,12 @@ Options related to the email message body:
     -o  message-header=EMAIL HEADER
     -o  message-charset=CHARSET
     -o  message-format=raw
-    
+
 -u SUBJECT
     This option allows you to specify the subject for your email message.
-    It is not required (anymore) that the subject be quoted, although it 
+    It is not required (anymore) that the subject be quoted, although it
     is recommended.  The subject will be read until an argument starting
-    with a hyphen (-) is found.  
+    with a hyphen (-) is found.
     Examples:
       -u "Contact information while on vacation"
       -u New Microsoft vulnerability discovered
@@ -1457,18 +1457,18 @@ Options related to the email message body:
     body for your email.  The message may be specified on the command line
     with this -m option, read from a file with the -o message-file=FILE
     option, or read from STDIN if neither of these options are present.
-    
+
     It is not required (anymore) that the message be quoted, although it is
     recommended.  The message will be read until an argument starting with a
     hyphen (-) is found.
     Examples:
       -m "See you in South Beach, Hawaii.  -Todd"
       -m Please ensure that you upgrade your systems right away
-    
+
     Multi-line message bodies may be specified with the -m option by putting
     a "\\n" into the message.  Example:
       -m "This is line 1.\\nAnd this is line 2."
-    
+
     HTML messages are supported, simply begin your message with "<html>" and
     sendEmail will properly label the mime header so MUAs properly render
     the message.  It is currently not possible without "-o message-format=raw"
@@ -1487,14 +1487,14 @@ Options related to the email message body:
     just add "-o message-content-type=html" to the command line to force it
     to display as an html message. This actually just changes the Content-Type:
     header. Advanced users will be happy to know that if you specify anything
-    other than the three options listed above it will use that as the vaule
+    other than the three options listed above it will use that as the value
     for the Content-Type header.
 
 -o message-header=EMAIL HEADER
     This option allows you to specify additional email headers to be included.
     To add more than one message header simply use this option on the command
     line more than once.  If you specify a message header that sendEmail would
-    normally generate the one you specified will be used in it's place.
+    normally generate the one you specified will be used in its place.
     Do not use this unless you know what you are doing!
     Example:
       To scare a Microsoft Outlook user you may want to try this:
@@ -1522,28 +1522,28 @@ Options related to the email message body:
       -o message-header=EMAIL HEADER
       -o message-charset=CHARSET
       -a ATTACHMENT
-      
+
 
 ${colorGreen}The Message Body${colorNormal}
 The email message body may be specified in one of three ways:
  1) Via the -m MESSAGE command line option.
     Example:
       -m "This is the message body"
-      
+
  2) By putting the message body in a file and using the -o message-file=FILE
     command line option.
     Example:
       -o message-file=/root/message.txt
-      
- 3) By piping the message body to sendEmail when nither of the above command
+
+ 3) By piping the message body to sendEmail when neither of the above command
     line options were specified.
     Example:
       grep "ERROR" /var/log/messages | sendEmail -t you\@domain.com ...
 
 If the message body begins with "<html>" then the message will be treated as
 an HTML message and the MIME headers will be written so that a HTML capable
-email client will display the message in it's HTML form.
-Any of the above methods may be used with the -o message-format=raw option 
+email client will display the message in its HTML form.
+Any of the above methods may be used with the -o message-format=raw option
 to deliver an already complete email message.
 
 
@@ -1592,7 +1592,7 @@ Options that don't fit anywhere else:
 -o   password=PASSWORD (synonym for -xp)
     These options allow specification of a password to be used with SMTP
     servers that require authentication.  If a username is specified but a
-    password is not, you will be prompted to enter one at runtime. 
+    password is not, you will be prompted to enter one at runtime.
 
 -o   tls=<auto|yes|no>
     This option allows you to specify if TLS (SSL for SMTP) should be enabled
@@ -1670,7 +1670,7 @@ Options related to networking:
     This option sets the timeout value in seconds used for all network reads,
     writes, and a few other things.
 
-    
+
 EOM
             last CASE;
         };
@@ -1709,7 +1709,7 @@ Options related to output:
         Specifies a debug level of 1:  -v
         Specifies a debug level of 2:  -vv
         Specifies a debug level of 2:  -v -v
-    A debug level of one is recommended when doing any sort of debugging.  
+    A debug level of one is recommended when doing any sort of debugging.
     At that level you will see the entire SMTP transaction (except the
     body of the email message), and hints will be displayed for most
     warnings and errors.  The highest debug level is three.
@@ -1776,7 +1776,7 @@ if (!($message)) {
     if ($opt{'message-file'}) {
         if (! -e $opt{'message-file'}) {
             printmsg("ERROR => Message body file specified [$opt{'message-file'}] does not exist!", 0);
-            printmsg("HINT => 1) check spelling of your file; 2) fully qualify the path; 3) doubble quote it", 1);
+            printmsg("HINT => 1) check spelling of your file; 2) fully qualify the path; 3) double quote it", 1);
             quit("", 1);
         }
         if (! -r $opt{'message-file'}) {
@@ -1793,7 +1793,7 @@ if (!($message)) {
         }
         close(MFILE);
     }
-    
+
     ## Read message body from STDIN
     else {
         alarm($conf{'alarm'}) if ($^O !~ /win/i);  ## alarm() doesn't work in win32
@@ -1833,8 +1833,8 @@ my $date = sprintf("%s, %s %s %d %.2d:%.2d:%.2d %s",$day, $mday, $mon, $year, $h
 ##  Connect to the SMTP server  ##
 ##################################
 printmsg("DEBUG => Connecting to $conf{'server'}:$conf{'port'}", 1);
-$SIG{'ALRM'} = sub { 
-    printmsg("ERROR => Timeout while connecting to $conf{'server'}:$conf{'port'}  There was no response after $conf{'alarm'} seconds.", 0); 
+$SIG{'ALRM'} = sub {
+    printmsg("ERROR => Timeout while connecting to $conf{'server'}:$conf{'port'}  There was no response after $conf{'alarm'} seconds.", 0);
     printmsg("HINT => Try specifying a different mail relay with the -s option.", 1);
     quit("", 1);
 };
@@ -1888,8 +1888,8 @@ if (SMTPchat('EHLO ' . $opt{'fqdn'}))   {
     }
 }
 else {
-    
-    ## Determin if the server supports TLS
+
+    ## Determine if the server supports TLS
     if ($conf{'SMTPchat_response'} =~ /STARTTLS/) {
         $conf{'tls_server'} = 1;
         printmsg("DEBUG => The remote SMTP server supports TLS :)", 2);
@@ -1898,7 +1898,7 @@ else {
         $conf{'tls_server'} = 0;
         printmsg("DEBUG => The remote SMTP server does NOT support TLS :(", 2);
     }
-    
+
     ## Start TLS if possible
     if ($conf{'tls_server'} == 1 and $conf{'tls_client'} == 1 and $opt{'tls'} =~ /^(yes|auto)$/) {
         printmsg("DEBUG => Starting TLS", 2);
@@ -1909,15 +1909,15 @@ else {
         }
         printmsg("DEBUG => TLS: Using cipher: ". $SERVER->get_cipher(), 3);
         printmsg("DEBUG => TLS session initialized :)", 1);
-        
+
         ## Restart our SMTP session
         if (SMTPchat('EHLO ' . $opt{'fqdn'})) { quit($conf{'error'}, 1); }
     }
     elsif ($opt{'tls'} eq 'yes' and $conf{'tls_server'} == 0) {
         quit("ERROR => TLS not possible! Remote SMTP server, $conf{'server'},  does not support it.", 1);
     }
-    
-    
+
+
     ## Do SMTP Auth if required
     if ( $opt{'username'} and $opt{'password'} ) {
         if ($conf{'SMTPchat_response'} !~ /AUTH\s/) {
@@ -1926,17 +1926,17 @@ else {
         else {
             my $auth_succeeded = 0;
             my $mutual_method = 0;
-            
+
             # ## SASL CRAM-MD5 authentication method
             # if ($conf{'SMTPchat_response'} =~ /\bCRAM-MD5\b/i) {
             #     printmsg("DEBUG => SMTP-AUTH: Using CRAM-MD5 authentication method", 1);
             #     if (SMTPchat('AUTH CRAM-MD5')) { quit($conf{'error'}, 1); }
-            #     
+            #
             #     ## FIXME!!
-            #     
+            #
             #     printmsg("DEBUG => User authentication was successful", 1);
             # }
-            
+
             ## SASL LOGIN authentication method
             if ($auth_succeeded == 0 and $conf{'SMTPchat_response'} =~ /\bLOGIN\b/i) {
                 $mutual_method = 1;
@@ -1950,28 +1950,28 @@ else {
                     }
                 }
                 if ($auth_succeeded == 0) {
-                    printmsg("DEBUG => SMTP-AUTH: LOGIN authenticaion failed.", 1);
+                    printmsg("DEBUG => SMTP-AUTH: LOGIN authentication failed.", 1);
                 }
             }
-            
+
             ## SASL PLAIN authentication method
             if ($auth_succeeded == 0 and $conf{'SMTPchat_response'} =~ /\bPLAIN\b/i) {
                 $mutual_method = 1;
                 printmsg("DEBUG => SMTP-AUTH: Using PLAIN authentication method", 1);
                 if (SMTPchat('AUTH PLAIN ' . base64_encode("$opt{'username'}\0$opt{'username'}\0$opt{'password'}"))) {
-                    printmsg("DEBUG => SMTP-AUTH: PLAIN authenticaion failed.", 1);
+                    printmsg("DEBUG => SMTP-AUTH: PLAIN authentication failed.", 1);
                 }
                 else {
                     $auth_succeeded = 1;
                     printmsg("DEBUG => User authentication was successful (Method: PLAIN)", 1);
                 }
             }
-            
+
             ## If none of the authentication methods supported by sendEmail were supported by the server, let the user know
             if ($mutual_method == 0) {
                 printmsg("WARNING => SMTP-AUTH: No mutually supported authentication methods available", 0);
             }
-            
+
             ## If we didn't get authenticated, log an error message and exit
             if ($auth_succeeded == 0) {
                 quit("ERROR => ERROR => SMTP-AUTH: Authentication to $conf{'server'}:$conf{'port'} failed.", 1);
@@ -2017,24 +2017,24 @@ if ($opt{'message-format'} =~ /^raw$/i) {
 
 ## If the message-format isn't raw, then build and send the message,
 else {
-    
+
     ## Message-ID: <MessageID>
     if ($opt{'message-header'} !~ /^Message-ID:/iom) {
         $header .= 'Message-ID: <' . $conf{'Message-ID'} . '@' . $conf{'hostname'} . '>' . $CRLF;
     }
-    
+
     ## From: "Name" <address at domain.com> (the pointless test below is just to keep scoping correct)
     if ($from and $opt{'message-header'} !~ /^From:/iom) {
         my ($name, $address) = returnAddressParts($from);
         $header .= 'From: "' . $name . '" <' . $address . '>' . $CRLF;
     }
-    
-    ## Reply-To: 
+
+    ## Reply-To:
     if ($opt{'reply-to'} and $opt{'message-header'} !~ /^Reply-To:/iom) {
         my ($name, $address) = returnAddressParts($opt{'reply-to'});
         $header .= 'Reply-To: "' . $name . '" <' . $address . '>' . $CRLF;
     }
-    
+
     ## To: "Name" <address at domain.com>
     if ($opt{'message-header'} =~ /^To:/iom) {
         ## The user put the To: header in via -o message-header - dont do anything
@@ -2043,15 +2043,15 @@ else {
         $header .= "To:";
         for (my $a = 0; $a < scalar(@to); $a++) {
             my $msg = "";
-            
+
             my ($name, $address) = returnAddressParts($to[$a]);
             $msg = " \"$name\" <$address>";
-            
+
             ## If we're not on the last address add a comma to the end of the line.
             if (($a + 1) != scalar(@to)) {
                 $msg .= ",";
             }
-            
+
             $header .= $msg . $CRLF;
         }
     }
@@ -2059,24 +2059,24 @@ else {
     else {
         $header .= "To: \"Undisclosed Recipients\" <>$CRLF";
     }
-    
+
     if (scalar(@cc) > 0 and $opt{'message-header'} !~ /^Cc:/iom) {
         $header .= "Cc:";
         for (my $a = 0; $a < scalar(@cc); $a++) {
             my $msg = "";
-            
+
             my ($name, $address) = returnAddressParts($cc[$a]);
             $msg = " \"$name\" <$address>";
-            
+
             ## If we're not on the last address add a comma to the end of the line.
             if (($a + 1) != scalar(@cc)) {
                 $msg .= ",";
             }
-            
+
             $header .= $msg . $CRLF;
         }
     }
-    
+
     if ($opt{'message-header'} !~ /^Subject:/iom) {
         $header .= 'Subject: ' . $subject . $CRLF;                   ## Subject
     }
@@ -2090,7 +2090,7 @@ else {
     # if ($opt{'message-header'} !~ /^X-Originating-IP:/iom) {
     #     $header .= 'X-Originating-IP: ['.$conf{'ip'}.']'.$CRLF;      ## X-Originating-IP
     # }
-    
+
     ## Encode all messages with MIME.
     if ($opt{'message-header'} !~ /^MIME-Version:/iom) {
         $header .=  "MIME-Version: 1.0$CRLF";
@@ -2100,20 +2100,20 @@ else {
         if (scalar(@attachments) == 0) { $content_type = 'multipart/related'; }
         $header .= "Content-Type: $content_type; boundary=\"$conf{'delimiter'}\"$CRLF";
     }
-    
+
     ## Send additional message header line(s) if specified
     if ($opt{'message-header'}) {
         $header .= $opt{'message-header'};
     }
-    
+
     ## Send the message header to the server
     print $SERVER $header . $CRLF;
-    
+
     ## Start sending the message body to the server
     print $SERVER "This is a multi-part message in MIME format. To properly display this message you need a MIME-Version 1.0 compliant Email program.$CRLF";
     print $SERVER "$CRLF";
-    
-    
+
+
     ## Send message body
     print $SERVER "--$conf{'delimiter'}$CRLF";
     ## Send a message content-type header:
@@ -2135,14 +2135,14 @@ else {
     print $SERVER "        charset=\"" . $opt{'message-charset'} . "\"$CRLF";
     print $SERVER "Content-Transfer-Encoding: 7bit$CRLF";
     print $SERVER $CRLF . $message;
-    
-    
-    
-    ## Send Attachemnts
+
+
+
+    ## Send Attachments
     if (scalar(@attachments) > 0) {
         ## Disable the alarm so people on modems can send big attachments
         alarm(0) if ($^O !~ /win/i);  ## alarm() doesn't work in win32
-        
+
         ## Send the attachments
         foreach my $filename (@attachments) {
             ## This is check 2, we already checked this above, but just in case...
@@ -2158,10 +2158,10 @@ else {
             }
         }
     }
-    
-    
+
+
     ## End the mime encoded message
-    print $SERVER "$CRLF--$conf{'delimiter'}--$CRLF";  
+    print $SERVER "$CRLF--$conf{'delimiter'}--$CRLF";
 }
 
 
@@ -2190,10 +2190,10 @@ close $SERVER;
 
 if ($conf{'debug'} or $conf{'logging'}) {
     printmsg("Generating a detailed exit message", 3);
-    
+
     ## Put the message together
     my $output = "Email was sent successfully!  From: <" . (returnAddressParts($from))[1] . "> ";
-    
+
     if (scalar(@to) > 0) {
         $output .= "To: ";
         for ($a = 0; $a < scalar(@to); $a++) {
@@ -2213,19 +2213,19 @@ if ($conf{'debug'} or $conf{'logging'}) {
         }
     }
     $output .= "Subject: [$subject] " if ($subject);
-    if (scalar(@attachments_names) > 0) { 
+    if (scalar(@attachments_names) > 0) {
         $output .= "Attachment(s): ";
         foreach(@attachments_names) {
             $output .= "[$_] ";
         }
     }
     $output .= "Server: [$conf{'server'}:$conf{'port'}]";
-    
-    
+
+
 ######################
 #  Exit the program  #
 ######################
-    
+
     ## Print / Log the detailed message
     quit($output, 0);
 }


More information about the Libreoffice-commits mailing list