RFC 822 defines a Messsge-id header that the client can set, and most MTAs can be configured to add one if not set by the client. IIRC, they're supposed to be globally unique, but like so many things in email, ymmv.
Edit: oh, yeah, there's also a queue id returned in the 250 response (in postfix, at least)
Yeah, just in the text of the OK response. So I guess it isn't really very structured. Seems like it would be a useful ESMTP capability to add though - queue identifier and MTA-assigned message-ID.
Edit: oh, yeah, there's also a queue id returned in the 250 response (in postfix, at least)