base.m4, auth.m4: Track a per-message authenticated user.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 24 Mar 2016 10:48:56 +0000 (10:48 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 24 Mar 2016 10:48:56 +0000 (10:48 +0000)
commite90159689acef685dd341342f4697774a51c6a64
tree77f155c38856ed495bb5faae18c80acb6d3db70d
parent4aceee8c511e751b3a0a2a35af4fbfe84b1e9d2e
base.m4, auth.m4: Track a per-message authenticated user.

If we're relaying mail, and believing `AUTH=...' notes on `MAIL' lines,
then (a) we might be given several messages during a session, and (b)
they will in general have different `AUTH=...' notes, or none at all.
If we want to report the authenticated sender of a message, then, it's
important to track this information separately for each message.

Therefore, introduce `$acl_m_user', as a per-message counterpart to
`$acl_c_user'.  It gets set the same as `$acl_c_user' for non-SMTP
messages (where there can only be one) and after we've just checked a
submitter, in `mail_auth_check'; but it also gets set from
`$authenticated_sender' in the `mailauth' ACL.
auth.m4
base.m4