It seems Thunderbird sends out my private/lan IP to the SMTP server. For example, in an Email sent out by Thunderbird, the header contains

Received: from [192.168.1.2] (example.com [1.2.3.4]) by mail.example.com (Postfix) with ESMTPSA id 92CD297DEA;

It is fine that the SMTP server records the public IP ( 1.2.3.4 ) as it is what it sees. But I believe only Thunderbird can get my lan IP ( 192.168.1.2 here, as the SMTP server on the Internet can’t find that) and it sent the info to the SMTP server.

How to make Thunderbird hide the lan IP in the header of emails sent out?

The private IP (lan IP) is likely the Extended HELLO (EHLO) or HELLO (HELO).

You can change the HELO message:

Go to Thunderbird’s about:config page (in Preferences > Advanced > General > Config Editor).

Find the mail.smtpserver.default.hello_argument preference (create it by right-clicking > New > String if it doesn’t exist yet).

Enter localhost as its value. Then that field in the Email header will contains localhost instead of your private IP.

One example for your reference: