There are several ways servers deal with unwanted e-mails
(spam). One way is to look for specific content in e-mails, like
the phase "cheap viagra", assume e-mails with that specific content
are unwanted, and delete them.
Another way, which is very effective in my experience, is to
employ a service called a "DNS blocklist", or DNSBL. With such a
blocklist, every time another mailserver tries to send mail to the
server, it will check if its address is in the blocklist, and if it
is, refuse to accept any incoming mail from the server in question.
www.spamhaus.org is one provider.