Zend certified PHP/Magento developer

How does SMTP servers authenticate to each other

As a regular user, to send email through a SMTP server, e.g. gmail, I need to authenticate.
However when gmail send an email received from its user, to a different domain, e.g. outloom.com, it also uses SMTP, right?

In that case, how is authentication done? I don’t think there is any username/password used…
Does the receiving server just rely on SPF and DKIM? What if the sending server didn’t set those things up?