It should be solved by small daemon by SMTP server hooking. I know if connection is authjorized here, and i am using this information in GrayWall. (Authorized connections are not delayed anymore...)
So, most easy way is small daemon what can detect this state and add requested header to message. I must think about it too.