Mazza is best known by Imps fans for his excellent nine years service at Sincil Bank, curtailed by Peter Jackson in the summer.
The 30-year-old is David Holdsworth's second signing since taking charge at Field Mill, joining former Diamonds team-mate Curtis Woodhouse at Town.
Marriott spent nine years with City and made more than 350 league appearances there before being released in 2008. He holds the record for highest number of appearances by a goal keeper, and is still held in extremely high regard by Imps fans.
He joined Diamonds in July and made 12 appearances for them this season.