Fediverse is
slightly better than email because there is a cost in the domain from which you send spam. Vanilla SMTP provides zero authentication so anyone can impersonate any domain. Technologies like DKIM and SPF are relatively new and not everyone uses them.
ActivityPub, however, requires all POST requests to be signed by the server that sends them. The signature is made with an RSA key of the actor that performed the activity. The public key of that pair is inside the JSON object of the actor. So, to verify the signature for an incoming activity, you'd make a request back to the originating server to fetch the actor object. This makes spoofing impossible and domain bans practical.