ssql rewrite mail auth up