Setup VPS mail server and import to Gmail

Solution 1:

  1. Install, configure and ensure that you have a working SMTP server.
  2. Install, configure and ensure you have a working IMAP server.
  3. Add the e-mail account as a account in your gmail setup.

There's no need to configure postfix to communicate with gmail. You simply configure gmail to fetch mail via IMAP from your mailserver.

Given your understanding of e-mail I'd be hesitant of hosting my own. It's a service where it's trivial do do non-obvious blunders that affect delivery and reputation.

Google workspace costs 6USD/month. Your setup will be a Rube Goldberg-contraption that will probably cost comparable amounts of money, and take a lot of time to configure and maintain. It's better to simply let Google handle it.