The announcement was made by Microsoft General Counsel Brad Smith in an open letter posted on the company's Web site.
After covering its legal expenses, Microsoft will dedicate $5 million to helping law enforcement agencies address computer-related crimes, Smith said.
"In appreciation of the role of the New York attorney general, another $1 million of this settlement money will be directed to New York state...to expand computer-related skills training for youths and adults," he said in the letter.
Describing Richter--who is said to have sent or assisted others in sending more than 38 billion e-mails a year--as one of the world's most "prolific" spammers, Smith called the settlement a milestone and expressed hope the decision would send a clear warning to those dabbling in spamming.
Richter could have paid a fraction of the millions if he had settled at the end of 2004 when Microsoft allegedly offered to settle the dispute for $100,000.
Then, Richter said: "We told them where they could go stick it. It's nothing but harassment. It's free publicity for them. They pay a few thousand bucks to file the lawsuits. They get a bunch of free press, and people sign up for their spam-fighting products."
At the end of March, Richter filed for Chapter 11 bankruptcy protection for his e-mail marketing company, OptInRealBig.com. One condition of the settlement with Microsoft was that Richter would file a motion to dismiss the bankruptcy proceedings.
Munir Kotadia of ZDNet Australia reported from Sydney.