Configuring Recipient Verification

The Generic Mail Agent is capable of performing basic recipient verification on the incoming emails in order to ensure that emails not bound for a specific domain or containing illegal characters do not enter the system. By default, recipient verification is enabled but no domains are configured so every domain will be considered an accepted domain. If recipient verification fails the email will not enter the system.

Reject emails not bound for local domain(s)

In order to discard emails that are not addressed to recipients in your domain(s) you need to configure Mail Agent by specifying a list of local domains that are accepted.

  1. Go to the installation folder (by default C:\Program Files (x86)\OPSWAT\Metadefender Core <engine count>\Metadefender Mail Agent)

  2. Open as administrator the file Metadefender.Email.Engine.Generic.Agent.dll.config for editing

  3. Add a comma (,) separated list of local domains as value for the setting called EmailRelayInLocalDomains

    <setting name="EmailRelayInLocalDomains" serializeAs="String">
    <value>opswat.com,metadefender.com</value>
    </setting>

    Note: by default the value is (*) which means all domains are accepted.
    Note: Multiple domains are separated with a comma (,) character. It is possible to prefix the domain name with an * to accept sub domains. For example: *opswat.com will accept both opswat.com & subdomain.opswat.com.

  4. Save the file.

Verify Settings

In this section, you will verify your recipient verification settings work as expected.

  1. Open the Metadefender Core Management Console.

  2. Select Sources > Metadefender Email > Setup.

  3. Click Verify on the newly configured Metadefender Email instance.

    images/download/attachments/20220907/image2017-1-26_12-14-19.png

  4. Select Recipient Verification as verification type and specify an an external e-mail address as sender, a local mailbox as valid recipient e-mail address and an invalid (unwanted) e-mail address as Invalid recipient address..

    images/download/attachments/20220907/image2017-1-26_12-29-33.png

  5. Click Apply to perform the test. If the test is successful, recipient verification is configured correctly.

  6. Optionally, manually send an e-mail from an external source to a local mailbox to verify that recipient verification is working as expected.