I have two VPS, and I am using one as SMTP and the other as IMAP.
When I send from the outgoing to myself( using the same email), I receive it on the same server (SMTP). Instead, I want to receive it on the other server (IMAP).
And if I send an email to any other email with the SMTP server and they reply, I still receive it in SMTP.
but if someone just sent me an email without me sending it first, I received it in IMAP.
IMAP cannot receive mail from outside mail servers. You need an MTA (SMTP) to send and receive mail. IMAP is for retrieving mail with your mail client.
They’re wholly separate things. Set your MX records to point to the receiving server, and configure your sending mail clients to use the other server to send. It’s not a thing that needs cooperation between the systems, beyond knowing who is allowed to send and receive mail (so you need to sync up the users and virtual map one way or another…probably a network attached storage solution, but something as simple and mindless as rsync on a cronjob could do it, too).