Welcome to the Forum.
Let me start by saying all SMTP transactions can be classed as relaying mail from one machine to another. However it is important to class these in 2 ways.
Submission - where email is introduced into the system by submitting it to your Email provider.
Transport - where email is moved from sending email provider to receiving email provider.
Up until last year the ONLY approved port for email submission was port 587 with StartTLS
Email transport takes place to port 25 (with or without StartTLS - although the use of the latter to deliver mails to mail exchangers is increasing).
Part of the problem is the mail standards have evolved over the years, indeed although, port 465 SSL was declared obsolete for email submission back in 1998, the approved port for email submission was port 587 with explict SSL/TLS through use of the StartTLS command.
Whether a sending agent supports port 465 SSL/TLS very much depends on the code writers. Currently Ruby’s mail does not support implicit TLS connections - therefore the only port you can use in this instance is port 587 with StartTLS. It’s not alone in this instance. If you want to relay mail from a Microsoft Exchange server to a submission port, the only option is to use StartTLS.
Postfix can be set up to send outbound mail to a submission port using either port 465 SSL/TLS or port 587 StartTLS - However it should be stressed that this is really outside the scope of MIAB. We can try and help. Also Postfix includes it’s own take on Sendmail which uses postfix itself to send the mail. Where postfix is installed the native linux sendmail program should not be needed.