how to remove email server?

letters sent to mail, the server domain, remain on the server, but it is necessary to go to the server, because mail for the domain with is connected. Or can it be more correct to change the MX record of the server domain on the server to how to do it?

or disable the email server so that nothing goes through Dovecot. Now letters to the address matching the server address are sent via Dovecot, i.e. remains on the server (((, but it is necessary to leave like all other letters to the server

the picture shows that if the recipient is or another, then in the line “realay =”, and if the recipient is then “realay = dovecot”. it is necessary to always have realay = Otherwise, in the second case, the letters do not leave the server, but remain in the internal mail (((.

please help quickly!