Product » A free email server for Windows and Linux » Installation scenarios

Installing Xeams on a same machine where your primary email server is running

Usage Scenario

  • You are already using an email server, such as MS Exchange
  • Want to use Xeams to filter junk messages
  • Users connect to this email server to send and receive their emails


  • You only have 1 public IP address. The address is The MX record for your domain refers to this address.
  • The internal IP address of your primary server
  • Your firewall forwards incoming traffic for port 25 to

Message flow before installation

  1. Inbound messages are sent to on port 25, which hits your firewall and are eventually accepted by your primary email server running on
  2. Users connect to your primary server and fetch their email
  3. Users send their outbound messages using this primary server, which then sends the message out on the Internet.

Modifications in your primary server

  • Modify the SMTP port of your existing server from 25 to a different value, such as 2525. Refer to the documentation of your primary server to see how to change the port.
  • Configure your primary email server to forward all outbound messages to on port 25. This feature is sometimes referred to as Smart Host in an email server.

Recommended Installation Procedure

  • Install Xeams on the machine. 
  • Configure Xeams to run in Firewall mode
  • Configure SMTP Server in Xeams. Add every domain that is local and specify the IP address of your downstream server in the Forward To field.
    VERY IMPORTANT Specify a :2525 after the IP address, letting Xeams know to forward incoming emails to port 2525. See image below.


Message flow after installation

Following diagram shows the message flow after installation


Following table describes what happens at each step.

Step 1In-coming messages are forwarded to Xeams listening on port 25 of Xeams filtering engine analyze these messages and assigns a score to every message. Spam messages get quarantined on Xeams and never hits your downstream server. 
Step 2Good messages are forwarded to your primary server, listening on port 2525.
Step 3End-users connect to your downstream email server exactly the way they have been using it in the past. There will be no change on how they send and receive emails.
Step 4User composes a new out-bound message, which goes to your primary email server, such as Exchange.
Step 5Primary email server is configured to forward all out-bound messages to on port 25. Since the IP address of your downstream server is whitelisted as well as trusted, Xeams learns from what is going out.
Step 6Finally, the message is delivered to the recipient's SMTP server on the Internet.