Spam gets no respect. It’s a trivial, time-wasting annoyance. Who but a masochist would even want to think about it? For this reason, Finn Brunton’s Spam (MIT; $27.95) seems willfully perverse in its choice of subject. Brunton, however, insists that spam is good to think about, its diverse forms and dark purposes mirroring the more promising developments of information technology. By exploring the evolving definitions of spam, the constituencies that have promoted and fought it, and the ingenious varieties it has taken, Brunton seeks to provide, as his book’s subtitle promises, nothing less than “a shadow history of the Internet.”

Spam plays a surprising Virgil for Brunton’s descent into the seamy underworld of online life, disclosing the haphazard odyssey of the Internet from the 1970s to the present. The author finds that a “complex indeterminacy obtained at every stage of the Internet’s development,” and spam was part of this from the outset. It catalyzed debates about the Internet’s direction, provoking both designers and users to define the nature of online community, speech, privacy, commerce and governance. Spam also inspired new laws to regulate it and new technologies to block it. Spammers responded by exploiting legal loopholes and technological developments, revealing the Internet’s untapped capacities. Brunton cautiously praises spammers as an “avant-garde”: “In their crude way, they show the rest of the online population the network’s new capabilities.” They thrive on a minimally regulated Internet, highlighting the delicate compromises involved in freedom, innovation and security online.

Spam may be diverse, but like its edible namesake it retains a malleable consistency. Brunton captures it in tweetable academese: “Spam is the use of information technology infrastructure to exploit existing aggregations of human attention.” In spammers’ argot, it’s an attention whore. Spam appears wherever humans congregate on the Internet, including chatrooms, mailboxes, webpages, blogs and texting. It is thus an ideal vehicle for tracing “how human attention online, and the strategies for capturing it, changed over time.” This is especially relevant now that attention has become commoditized. Whatever we choose to view on the web has the potential to make money for someone else; our visits leave valuable information for Big Data collectors to harvest and Mad Men to exploit. Brunton shows that spam, by gaming search-engine results through the creation of spurious online content, already channels our attention in ways we don’t perceive.

Brunton nimbly charts spam’s evolution, his title a fortuitous semordnilap. Spam emerged during the Internet’s noncommercial period from the 1970s to the early ’90s, when the network was largely restricted to military and academic users. Computer resources were limited, placing a premium on relevant communication. “Spam” initially meant extraneous comments that wasted scarce bandwidth and tried people’s patience. (The term was derived from the Monty Python sketch about the food Spam, which repeated the word endlessly, driving out meaningful conversation.) Aside from general ”netiquette” guidelines, there was no systematic policy about how to handle spam. Instead, rough justice was meted out to those who would not play by the informal rules. Spammers could be inundated with abusive e-mails, unwanted pizza deliveries and other forms of symbolic violence that Brunton likens to the shaming rituals of early modern charivaris. Such ad hoc policing mechanisms were at best transitory and often ineffective.

This became clear when the Internet was privatized in the mid-1990s and online marketing exploded. E-mail spam as we know it made its debut in April 1994, when a shady law firm inundated nearly 6,000 newsgroups with an automated message ballyhooing an unnecessary service. Earlier conversations about the Internet as community were now entangled with claims that it was a commercial market. Brunton relates that while commercial spam was legal, many of its creators inhabited a noirish world of losers and grifters.

The failure of informal regulation led to the government’s CAN-SPAM Act of 2003, which treated much spam as legitimate advertising that was now required to be forthright about its commercial purpose and permit receivers to decline further solicitations. Brunton uses this as an example of the unforeseen consequences of Internet development. The act, coupled with new filtering software, would seem to have been a success: although approximately 85 percent of e-mail generated today is spam, only a fraction of it arrives in our inboxes. As a result, however, many legitimate but frustrated marketers have left the business, abandoning the field to a relatively small set of tech-savvy criminals who can produce enormous volumes of spam cheaply by commandeering the world’s computers via worms, viruses and other “malware.” These tools also enable them to capture personal and financial data that can be sold on the underground market, and to aggregate thousands of computers into “botnets” that can cripple servers through targeted attacks. Spam is good business for them, as well as for security consultants, the military and “hacktivist” groups like Anonymous, all of whom grasp the offensive and defensive potential of the spammers’ arsenal. “Trivial” spam therefore unexpectedly finds itself at the forefront of cybercrime, cyberprotest and cyberwar.

These observations are among the pleasures of this original history. Brunton ponders a range of related topics, including how metaphors—many drawn from science fiction—have assumed material form in the Internet’s development, and how “litspam” generated by robots to fool filters has its own alluring aesthetic: “It is the chance meeting of Ulysses and a telephone interchange.” Thanks to the smart questions it asks and the insightful history it delivers, Spam commands respect.