©XSIBackup-Free: Free Backup Software for ©VMWare ©ESXi

Forum ©XSIBackup: ©VMWare ©ESXi Backup Software


You are not logged in.

#1 Re: General matters » SMTP not working after upgrade to 11.2.6 » 2021-02-27 11:42:32

After edit in src/sendmail:
from
MAILOUT=$( (mail_input | openssl s_client -key "$PWD"/xsibackup_id_rsa${keyappend} -pause -connect ${LOCAL_SMTPSRV}:${LOCAL_SMTPPORT} -ign_eof -crlf >&5) 2>/dev/null )
to
MAILOUT=$( (mail_input | openssl s_client -key "$PWD"/xsibackup_id_rsa${keyappend} -pause -connect ${LOCAL_SMTPSRV}:${LOCAL_SMTPPORT} -ign_eof -crlf >&5) )
you will see error message. In my case it was:
unable to load client certificate private key file
137909130920:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:697:Expecting: ANY PRIVATE KEY

After some tries with keys from a few hosts and openssl options, I found that xsibackup_id_rsa.pem ought to be used insted of xsibackup_id_rsa so in src/send mail I changed:

    if [ -f "$PWD"/xsibackup_id_rsa.pem ]   
    then
    CHECK_KEY="$( openssl rsa -in "$PWD"/xsibackup_id_rsa.pem -check 2>&1 | head -n1 | awk '{print tolower($0)}' )"
    if [ "${CHECK_KEY}" == "unable to load private key" ]
    then
        DEL_PEM="$( rm -rf "$PWD"/xsibackup_id_rsa.pem )"
    fi   
    fi
    if [ ! -f "$PWD"/xsibackup_id_rsa.pem ]
    then
        if [ "$( python -c "print(${version_string_number}>=67013006603)" )" == "True" ]
    then
        GENPEM="$( openssl genpkey -algorithm RSA -out "$PWD"/xsibackup_id_rsa.pem -pkeyopt rsa_keygen_bits:2048 )"
    else
        if [ -f "$PWD"/xsibackup_id_rsa ]
            then
                /usr/lib/vmware/openssh/bin/ssh-keygen -f "$PWD"/xsibackup_id_rsa -m 'PEM' -e > "$PWD"/xsibackup_id_rsa.pem
        fi
    fi
    fi
    if [ "$( python -c "print(${version_string_number}>=67013006603)" )" == "True" ]
    then   
        keyappend=".pem"
    fi

decreasing condition to my 65017477841.

The problem host was patched to last version ESXi 6.5.

Board footer