I have two servers, A and B, both with the same domain, email, and password.
If I send myself four emails (info@example.com), I will receive two from server A and two from server B.
I want to receive from only one server, A or B. When I delete the email from server B and try to send it again, I will receive 2 emails in server A, and the other 2 will come back with an error unless I add the email back again in server B.
So you have 2 identical servers with exactly the same owners and users. I cannot see how the world is supposed to know which one to deliver any message. Presumably even the same mx record.
Kill the MX record for the server on which you do not wish to receive mail. This will prevent all external mail from reaching your server. Users on your server will still be able to send each other mail, however.
One server sends another receives. So far I have understood, but how is the implementation of MTA, MDA, MUA in the background? Wouldn’t it be more useful to have a single server that does all this?
So much engineering for an email or IP? You can block in many ways, in IPtables, in Postfix, in Dovecot, in Procmail, in SpamAssassin, in the email client.
I asked you above if you know how an email server works, about MTA, MDA, MUA. The moment you understand these notions, you will realize what you need for implementation. The configuration is mainly done in MUA, there you set a server for sending and another server for receiving. If you want to link the two servers (MTA’s), then we are talking about relay in postfix, changes in procmail, dovecot. That’s why I said too much engineering for no advantage. What do you do if a server goes down?
In Virtualmin, where you asked, you will not be able to implement this. Changes are required that Virtualmin will not know about. After you get the necessary knowledge you will reach my conclusion. Often simple things become complicated if you don’t know how to approach them.