When an SMTP server receives a message for delivery or further
processing, it MUST insert trace ("time stamp" or "Received") information at the beginning of the message content, as discussed in
section 4.1.1.4.
This line MUST be structured as follows:
- The FROM field, which MUST be supplied in an SMTP environment,
SHOULD contain both (1) the name of the source host as presented
in the EHLO command and (2) an address literal containing the IP
address of the source, determined from the TCP connection.
...
根据这个 SMTP 规范,SMTP 头信息必须包含发送源的 IP 地址,而且是由发送源建立 TCP 连接的信息中获得。