I have found a work around to my issue. I'm not sure it is the best option and do not what other issues it might cause. I copied the SSL.pm from ubuntu version 22.10 to 23.04 and everything is working now. I did verify that it is using tls.
Please let me know if anyone knows any security or other issues with this workaround
lines in SSL.pm
790 if ( ! defined $host ) {
791 if ( $host = $arg_hash->{PeerAddr} || $arg_hash->{PeerHost} ) {
792 $host =~s{^
793 (?:
794 ([^:[]+) | # ipv4|host
795 ([(.*)]) # [ipv6|host]
796 )
797 (:[\w-]+)? # optional :port
798 $}{$1$2}x; # ipv4|host|ipv6
799 }
780 }
I have been using sendemail with no issues with ubuntu 22.10 desktop-amd64 but when I upgraded to 23.04 desktop-amd64 I get the following error. I have tried suggestions to add smtp.gmail.com ip address to local host file without success. The following is the command I was using with the output with the error. All the updates have been installed
sendemail -v -f <account>@gmail.com -t <account>@comcast.net -s smtp.gmail.com:587 -u "Update Backup Information" -m Update-List -a file.txt -xu <account>@gmail.com -xp <password> -o tls=yes
Output from command
May 29 14:04:37 localhost sendemail[37776]: DEBUG => Connecting to smtp.gmail.com:587
May 29 14:04:37 localhost sendemail[37776]: DEBUG => My IP address is: 10.1.10.25
May 29 14:04:38 localhost sendemail[37776]: SUCCESS => Received: 220 smtp.gmail.com ESMTP nn6-20020a17090b38c600b002508f0ac3edsm2838235pjb.53 - gsmtp
May 29 14:04:38 localhost sendemail[37776]: INFO => Sending: EHLO localhost
May 29 14:04:38 localhost sendemail[37776]: SUCCESS => Received: 250-smtp.gmail.com at your service, [24.9.60.118], 250-SIZE 35882577, 250-8BITMIME, 250-STARTTLS, 250-ENHANCEDSTATUSCODES, 250-PIPELINING, 250-CHUNKING, 250 SMTPUTF8
May 29 14:04:38 localhost sendemail[37776]: INFO => Sending: STARTTLS
May 29 14:04:39 localhost sendemail[37776]: SUCCESS => Received: 220 2.0.0 Ready to start TLS
Use of uninitialized value $2 in concatenation (.) or string at /usr/share/perl5/IO/Socket/SSL.pm line 792.
May 29 14:04:39 localhost sendemail[37776]: ERROR => TLS setup failed: hostname verification failed
Can you provide any suggestions or a solution to my issue?