Configure the hosted email server to accept email from Metadefender Email server.
Configure Metadefender Email to relay out to hosted email server.
Update MX record to point to Metadefender Email server.
Go to https://admin.google.com and login to your Google Apps subscription.
Click 'MORE CONTROLS'.
Click 'Google Apps'.
Click 'Advanced settings'.
Scroll down to the 'Inbound gateway' section and click 'CONFIGURE'.
Specify a gateway name (Metadefender Email Relay) and the IP address of the Metadefender Email server. Check 'Automatically detect external IP (recommended)', 'Reject all mail not from gateway IPs' and 'Require TLS connection from the email gateways listed above'.
Click 'SAVE' at the bottom right of the screen to save the changes.
Connect to the Mail agent server and run the following REST POST request (using ,for example, POSTMAN) to http://localhost:8000/MailAgent/Settings
Verify routing settings by sending an email to a Google Apps recipient directly to the Metadefender Email server and verify that it arrives correctly in the recipient inbox.
Refer to your Internet domain registrar for details how to change MX record to point to Metadefender Email IP address. Verify email routing by sending an email to a Google Apps recipient.
Make sure that your MX record changes have propagated before verifying email routing.
Quarantine: Google Apps always does a malware check on all incoming emails, so releasing an infected item from quarantine will be rejected by Google Apps. As a workaround for this, configure quarantine to deliver emails to an alternative SMTP server that can accept infected emails