The man accused of the Christchurch mosque attacks has sent seven letters from prison and had two others withheld, Corrections Minister Kelvin Davis says.
Corrections has now blocked the accused gunman from sending or receiving mail after he sent a letter from prison that has been posted on the 4chan website.
Brenton Tarrant wrote the six-page letter in July.
The department has admitted it should not have allowed the letter to be sent.
In a statement, Corrections said prisoners were able to send and receive mail, but there can be restrictions in limited circumstances.
It said the letter should have been withheld and it has now changed the way it manages the accused gunman's mail.
Corrections chief executive Christine Stevenson apologised for the distress it has caused the victims and their families.
She said he was no longer able to send or receive any mail until Corrections was absolutely sure it had effective screening in place.
Corrections Minister Kelvin Davis said Corrections had made a mistake and should not have allowed the letter to be sent.
Mr Davis told Morning Report the prisoner had written nine letters while in custody.
"My advice is that he's sent seven letters - two to his mother, five to other people - but two have been withheld."
He had received at least "a couple of dozen" letters from people around the world, some of which had been withheld.
Mr Davis said the prisoner has no contact with other inmates and sees only his lawyers and Corrections officers.
He said Corrections had the right to withhold correspondence in accordance with the Act. "We have never had to manage a prisoner like this before - and I have asked questions around whether our laws are now fit for purpose and asked for advice on what changes we may now need to make.
Mr Davis said he "absolutely" had confidence in the Corrections chief executive Christine Stevenson.
Muslim community advocate Guled Mire said allowing the letter to be sent was shocking and dangerous, and a slap in the face for those tirelessly trying to counter hateful rhetoric.
He said it was a serious matter and was very re-traumatising for the Muslim community.
"You would have at least thought that there would have been more proper checks, processes, in place to ensure that such a thing never happened."
Prime Minister Jacinda Ardern also issued a direct message to the Corrections Department: The man accused of the Christchurch massacre should not have been allowed to send a letter from his cell.
Speaking from Tuvalu, Ms Ardern told media the government was now looking into whether a law change is needed to prevent such a mistake happening again.
"I think every New Zealander would have an expectation that this individual should not be able to share his hateful message from behind prison doors," she said.
Meanwhile, it was announced on Wednesday that Brenton Tarrant had been excused from his next court appearance.
The 28-year-old Australian national faces 51 charges of murder, 40 of attempted murder and one charge of terrorism.
He was set to appear in the High Court at Christchurch this morning for a case review hearing.
But his lawyers have advised they do not need him in court and he does not wish to attend.
It's not unusual for defendants - particularly those held in custody - to waive their right to appear in court.