The Angeli-Rimini reaction is an organic chemical test used to confirm the presence of aldehydes (formaldehyde etc) Details were first published in Italy in 1896. Despite its regular use, and more than a century of investigation, the exact details of the reaction remain unknown.
In this test a few drops of aldehyde containing specimen is dissolved in ethanol, the sulfonamide is added together with some sodium hydroxide solution and then the solution is acidified to Congo red. An added drop of ferric chloride will turn the solution an intense red when aldehyde is present.
[…]
The reaction mechanism for this reaction is not clear and several potential pathways exist.
Source : Wikipedia (technical details of the reaction)