First things first. Lets check what you are using:
which sendmail
This should echo something like /usr/sbin/sendmail
Then do the test line you had before, but add the flag "-v" (without the quotes) before the sendmail command. It will echo the whole of the communication between sendmail and the mail server.
Assuming you haven;t actively blocked port 25, you should not need the firewall commands. All that is needed for sending mail is port 25.
But be prepared for gmail to block you. It can get quite sniffy if it thinks you are sending spam. If thats bad, wait until you try and send mail to a o365 mail account!
Yes. This is a message that you're sending an email without any sender verification. It is expecting that the sender has an SPF or DKIM record. Thats an ISP setting, not a mail MTA setting. Its a whole different ball game, and in my experience, a whole new level of pain.
Long story short: Mail receivers try to ensure that the mail they receive is from validated senders. Senders have to authenticate that they are actually able to send in the name of the email address that they claim to come from. That means the receiver will check with the senders ISP go get a number of DNS records which the receiver can validate.
This is far from trivial, if you are sending to Gmail. It means setting up the DNS records with your ISP.
This is a whole new level of complexity and is the reason why I only use sendmail to send messages from my server to my own email address. So, things like cronlog events get sent, or issues with the server. But for sending email to real users I use an O365 account.
You can do this all on Linux, but not in 5 minutes.