More than four decades ago, comedian George Carlin famously — and profanely — riffed on the seven dirty words you can never say on television.

The District’s email system, it turns out, has a lot more verboten words than that: 42.

The words include familiar profanities, such as the f-word and its variations, the n-word and other racial slurs, and a few that can be heard on network television, according to a list provided to The Washington Post.

This is not prudishness, political correctness or an attempt to raise the level of civil discourse, officials said. It’s cybersecurity.

A test email from The Post with one of the offending terms to a dc.gov email address brought a bounceback notice: “Your recent message … contains unacceptable words or phrases. Please contact OCTO Citywide Messaging for assistance or reword your message.”

“OCTO” is the city’s Office of the Chief Technology Officer. Mike Rupert, a spokesman for the agency, said the list of dirty words is part of a spam filter the city instituted about eight years ago.

The filter blocked more than 276,000 pieces of spam last year, Rupert said, and must be robust because D.C. agencies are often confused with federal ones, making them bigger targets. He added that 95 percent of successful phishing attempts stem from human error.

“D.C. is especially unique because people think we’re federal government, so spammers really turn it up for us,” Rupert wrote in an email. He was unaware of any significant complaint about the filter.

The filter has changed over time, he said. A previous list of forbidden words topped 100 terms, including some that are less-commonly considered profane, such as “bimbos” and “trailer trash.”

Most of the time, an OCTO bounceback message is a quirk of communicating with the District. However, some social workers expressed annoyance with a system that can block descriptions of sexual assault.

Safe Shores is a nonprofit organization that works with the District to identify victims of sexual assault. One version of the agency’s “forensic interview request form,” which is used to schedule interviews with possible victims, contains a warning about the city’s spam filter.

“Be aware the city email filters can block emails containing ‘inappropriate language’ (words we often use in working sexual abuse cases),” the form reads. The form suggests using “email-friendly, professional words and phrases” when describing sexual assault allegations, including “genitals (not penis or vagina).” Safe Shores declined to comment for this article.

Gwendolyn Harter, a clinical supervisor at a nonprofit that works with the city on foster care and adoptions, said she receives bounceback messages a couple of times a month from dc.gov addresses. Using clinical language to describe threats and physical or sexual abuse, she said, can lead to unnecessary ambiguity.

“It creates a problem when we just can’t report the facts,” she said. “And the words we can use kind of soften it a little bit.”

A spokeswoman with the District’s Child and Family Services Agency, which handles foster care and adoption, said sexual assault is reported to the agency on forms attached to emails, which aren’t blocked by the filter. The filter also doesn’t prevent those with dc.gov addresses from sending emails containing dirty words to each other.

Rupert said agencies that deal with public health or public safety can have the filter turned off.

“We have turned off the filter for agencies who have requested due to the nature of their business and need to be easily accessible by certain customers,” he said.

In the world of spam, it turns out, each municipality is its own master. A spokesman for Montgomery County’s Department of Technology Services said it uses the spam filter that is part of Microsoft Office 365, the county’s email platform, but doesn’t block outside emails containing specific words.

Michael Dent, the chief information security officer for Fairfax County, said the county doesn’t use a filter that results in bounceback messages — but that doesn’t mean D.C. shouldn’t.

“The neat thing about locals is that we all have our own sovereign governments and govern our own way,” he said. “D.C. is a different monster entirely.”

Justin Cappos, an assistant professor of systems and security at New York University, said the District’s approach to spam “isn’t surprising.” The only problem: Bounceback messages might help spammers.

Indeed, propriety and the public interest demand that the full list of 42 words remain a mystery. Most cannot be printed in a family newspaper — and even if they could, printing them might compromise D.C. cybersecurity.

“It’s often the case that you won’t do bounceback messages … because you don’t want to tip them off on how they can bypass your spam filter,” Cappos said.