[SOLVED]use external mailserver

hello,

I am using the following setup:
Server A: website + full virtualmin, Dovecot disabled.
Server B: Exchange mail server from outlook.
I configured the DNS so the mail points to the outlook servers.

Problem:
Whenever I send an e-mail from the server to a user that has an e-mail address with any domain that is hosted on that server I get an error 500: user does not exist.

What happens:
I send the mail from the website (drupal, mail() function) to a user. Postfix grabs the e-mail and wants to deliver on the same server (A), while, according to the DNS, it should be delivering it to the exchange server (B).

What am I missing here?

I disabled “mail, virusscan, anti-spam” for all domains with external servers. I’m awaiting confirmation that the mails are arriving. Anyway I’m not getting any errors.

yeah, so that solves it. disable “mail, virus scan and anti-spam” for the virtual server. Then all mail will pass through. It might also be interesting to setup your MX records in the dns settings.