Software and it’s dependencies maintained by Linux distribution vendor (Debian community, Canonical, RedHat, etc.), delivered by packages ( DEB , RPM , ..) usually provided using package repositories (packages are signed so their authenticity is verified on download).
These packages actually forms …
There’s no anti-spam mechanism in XMPP protocol so there’s limited options one can do to avoid spam.