Receive Email from 1 server

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.

Why? do you mean same domain but different sub domains (ie A.example.com and B.example.com)

or is one domain (B) intended to be an alias of the other (A)?

no, both same domains.
i wanted to use 1 server for sending and the other for receiving

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.

no, the servers are with different sub domains and mx records…only emails and passwords are the same in both servers

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.

i tried that and still didn’t work also deleted the email address in server B and didnt work as well, it was coming back with an error

i had to delete the whole server

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?

the problem is that there are other emails on that server so i want only to not receive from one specific email

Isn’t that what SpamAssassin is for?

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.

image
image

as you can see i sent 4 emails to myself and i am receiving it in two different servers

i want to receive only from one server

i tried deleting the email address in the other server but when i try and send again 2 will be delivered and the other 2 will come back with an error

still don’t know how to solve this issue

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?

no, i don’t know how anything works. i am still new in all of that stuff

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.

thanks for your feedback

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.