
573 N.W.2d 261 (1998)
Eddie C. RISDAL, Appellee,
v.
STATE of Iowa, Appellant.
No. 96-452.
Supreme Court of Iowa.
January 21, 1998.
*262 Thomas J. Miller, Attorney General, and Forrest Guddall, Assistant Attorney General, for appellant.
Peter W. Hansen of Hildreth & Hansen, Burlington, for appellee.
Considered by HARRIS, P.J., and LARSON, CARTER, NEUMAN, and SNELL, JJ.
HARRIS, Justice.
The issue in this first amendment case comes down to whether a prisoner can be punished for writing statementshighly likely scurrilous onesunder the prison rule prohibiting verbal abuse. The district court concluded the prisoner's constitutional rights were violated. We granted further review from a court of appeals decision reversing the district court.
As with many free speech claims, this one revolves around offensive remarks few people would believe. Moreover the writings were those of a prisoner whose first amendment rights, though not extinguished, were circumscribed by reason of his imprisonment. They were directed toward prison officials whose rights in such matters we respect. And we are far from unmindful of another implication: every step required for a prison discipline proceeding invites a myriad of claims in future cases that it has been omitted or violated in some way. Nevertheless, like the district court, we think the prisoner was punished for the act of expressing himself, not for the manner in which he did so. We vacate the court of appeals decision and affirm the judgment of the district court.
I. Eddie C. Risdal, an inmate at the Iowa state penitentiary (the penitentiary), wrote a letter to Sally Halford, the director of the department of corrections (the department). Among various complaints in the letter is the *263 one at issue here. In it Risdal recommended Halford terminate the employment of James and Judy Burton, two penitentiary officials, "for illegally seizing and repainting Risdal's property etc., also for having sex with inmates, also for a 1992 murder attempt set up on Risdal's life conspired by James and Judy Burton."
Risdal was given a disciplinary notice for violation of prison disciplinary rule 26 governing verbal abuse. He was also charged with violating rules 27 (obstructive/disruptive conduct), 35 (false statements), 41 (defamation), and 43 (attempt or complicity). The notice alleged Risdal's letter "revealed slanderous statements against Captain James Burton and Lieutenant Judy Burton, verbal abuse in written form and deceptive statements."
When Risdal appeared before the disciplinary committee he admitted he wrote the letter, but insisted he had a right to do so. He stated he had personally witnessed the sex act. He did not present any evidence regarding the murder conspiracy. The administrative law judge found Risdal only violated rule 26, which states:

Verbal Abuse: An inmate commits verbal abuse when the inmate subjects another person to abusive or defamatory language, remarks, or gestures, in writing or orally, and includes insolence or disrespect to another person.
Risdal was sanctioned to ten days disciplinary detention, loss of sixteen days good time, and restriction to the maximum security cell house for fifteen days.
After exhausting his administrative remedies Risdal filed this application for postconviction relief. He alleged his letter did not violate rule 26 because he had a right to complain to the director of the department of illegal conduct in the prison.
The district court ruled that, although it did not lend any credence to the allegations, Risdal was improperly subjected to discipline merely because he made allegations which were presumed to be false when sanctions were imposed. Relying on Procunier v. Martinez, 416 U.S. 396, 94 S.Ct. 1800, 40 L.Ed.2d 224 (1974), the district court found Risdal's letter did not interfere with the prison's legitimate interest in maintaining security and discipline. The court concluded Risdal was punished because of the content of his letter and not because of the manner in which those complaints were expressed; therefore the imposition of discipline violated his first amendment rights.
II. Postconviction relief proceedings are generally treated as actions at law. Hughes v. State, 543 N.W.2d 872, 874 (Iowa 1995). But when a case involves a prisoner's claim that he was disciplined in violation of his constitutional rights we review the claim "in light of the totality of the circumstances and the record upon which the postconviction court's ruling was made." James v. State, 541 N.W.2d 864, 869 (Iowa 1995). This is functionally equivalent to de novo review. Mark v. State, 556 N.W.2d 152, 153 (Iowa 1996).
III. Imprisonment does not strip inmates of all constitutional rightsincluding free speech rights protected by the first amendment of the United States Constitution. Lawful incarceration however necessitates a "`withdrawal or limitation of many privileges and rights, a retraction justified by the considerations underlying our penal system.'" Pell v. Procunier, 417 U.S. 817, 822, 94 S.Ct. 2800, 2804, 41 L.Ed.2d 495, 501 (1974) (quoting Price v. Johnston, 334 U.S. 266, 285, 68 S.Ct. 1049, 1060, 92 L.Ed. 1356, 1369 (1948)). Prisoners however retain a "constitutional right to access to the courts." Bounds v. Smith, 430 U.S. 817, 821, 97 S.Ct. 1491, 1494, 52 L.Ed.2d 72, 78 (1977). Inmates also retain a first amendment right "to articulate and press complaints about the behavior of prison staff and the conditions and incidents of their confinement." Mark, 556 N.W.2d at 154; see also Sprouse v. Babcock, 870 F.2d 450, 452 (8th Cir.1989). Additionally "[t]he filing of disciplinary charges against an inmate in retaliation for an inmate's exercise of this right to file a grievance, even if the grievance is determined to be without merit, is also a violation of the inmate's constitutional rights." Mark, 556 N.W.2d at 154.
*264 In judging a prison official's conduct, the court must take into account that prison administrators are "accorded wide-ranging deference in the adoption and execution of policies and practices that in their judgment are needed to preserve internal order and discipline and to maintain institutional security." Bell v. Wolfish, 441 U.S. 520, 547, 99 S.Ct. 1861, 1878, 60 L.Ed.2d 447, 474 (1979). The Bell court reasoned that
"[s]uch considerations are peculiarly within the province and professional expertise of corrections officials, and in the absence of substantial evidence in the record to indicate that the officials have exaggerated their response to these considerations, courts should ordinarily defer to their expert judgment in such matters."
Bell, 441 U.S. at 547-48, 99 S.Ct. at 1878-79, 60 L.Ed.2d at 474 (quoting Pell, 417 U.S. at 827, 94 S.Ct. at 2806, 41 L.Ed.2d at 504).
Martinez, cited by the district court, set up the following two-prong analysis governing prison regulations restricting freedom of speech:
First, the regulation or practice in question must further an important or substantial governmental interest unrelated to the suppression of expression . . . . [Prison officials]. . . must show that a regulation authorizing mail censorship furthers one or more of the substantial governmental interests of security, order, and rehabilitation. Second, the limitation of First Amendment freedoms must be no greater than is necessary or essential to the protection of the particular governmental interest involved.
Martinez, 416 U.S. at 413, 94 S.Ct. at 1811, 40 L.Ed.2d at 240.
The heightened standard of scrutiny, announced in Martinez, was greatly narrowed in a line of cases culminating in Turner v. Safley, 482 U.S. 78, 107 S.Ct. 2254, 96 L.Ed.2d 64 (1987). Under Turner a prisoner's constitutional rights are not impinged by regulations "reasonably related to legitimate penological interests." Turner, 482 U.S. at 89, 107 S.Ct. at 2261, 96 L.Ed.2d at 79. This analysis calls for a four-prong inquiry: (1) whether there is a "valid, rational connection between the prison regulation and the legitimate governmental interest put forward to justify it"; (2) "whether there are alternative means of exercising the right that remain open to prison inmates"; (3) "the impact accommodation of the asserted constitutional right will have on guards and other inmates, and on the allocation of prison resources generally"; and (4) the "absence of ready alternatives," or, in other words, whether the rule at issue is an "exaggerated response to prison concerns." Id. at 89-90, 107 S.Ct. at 2261-63, 96 L.Ed.2d at 79-80.
A matter of importance in some cases, though not in this one, is whether the prisoner's letter is addressed to the prison system or to persons outside it. The distinction can be important because a prisoner has greater freedom of expression under the first amendment when addressing remarks to outsiders, where defiance of prison authority would have less impact on prison management. See Leonard v. Nix, 55 F.3d 370, 376 (8th Cir. 1995). Although the point is disputed, we agree with the State that Risdal's remarks, addressed to the department, were in effect directed to the prison which functions under it. The distinction has no impact on this case because we think Risdal's rights were violated even though his remarks were addressed to the prison system itself.
IV. What controls here is that, though Risdal's allegations seem preposterous, and were obviously insulting and highly inflammatory, they were couched in language that was not vulgar or obscene. He was punished for the subject of his allegations, and not the manner of his remarks. This fact distinguishes the present case from the authorities relied on by the State. We do not hold that prison authorities are helpless when prompted to punish a prisoner for utterances such as those made by Risdal. But, as previously mentioned, Risdal was not found guilty of violating the false-statements rule. We do not decide that a verbal-abuse violation could never occur so long as the utterance was couched in objectional verbiage. But such a violation would require, at a minimum, a showing that the insulting accusations were false. No such showing was attempted here.
*265 DECISION OF COURT OF APPEALS VACATED; DISTRICT COURT JUDGMENT AFFIRMED.
