Back to Blog Home
May 19, 2022

How to Set Up an SMTP Relay Server with Axigen

The following article will show you how to quickly setup an SMTP relay server with the help of the Axigen mail server.

The information we’re presenting here was derived from a real use case from one of our customers. After assisting & optimizing their implementation of Axigen, we decided the process was worth writing down, as SMTP relay servers are absolutely something our mail server platform can be used for in a very efficient manner.

So, here are all the steps required to setup an SMTP relay server, followed by a detailed rundown of some performance tuning implements so that your server always works like a dream.

smtp-relay-server

1. Downloading the Axigen Mail Server

Before proceeding to SMTP relay setup, you need to download the installer for your platform. Axigen is available for Windows, Linux, and Docker.

Go to our Download page and select the correct installer for you.

2. Installing the Axigen Mail Server

Linux

The basic steps for installing Axigen on Linux:

  1. Download the installation kit file
  2. Run sh <file.run> as root
  3. The self-extracting shell script will install Axigen
  4. Axigen will start immediately after installation
  5. Open WebAdmin to start configuration

For more information, see our documentation for Linux installation. 

Windows

To install Axigen on Windows, here’s what you need to do:

  1. Download the installation msi file
  2. Launch the installer
  3. Follow the installation wizard
  4. Perform initial configuration
  5. Start Axigen

For info on initial configuration, and additional info on install, see our documentation for Windows installation. 

Docker

To run the Axigen mail server in a Docker Container, you have to download the CentOS 8 image with Axigen preinstalled and preconfigured. More information about this image & about running it can be found in our documentation for Axigen in Docker.

3. Configuring the Mail Server as an SMTP Relay

Now that you have the Axigen Mail Server up and running, it’s time to set up the SMTP relay server.

Note: you need to be logged in to the Axigen WebAdmin for this part.

1. Disable IMAP & POP3 

The first step is to disable both IMAP & POP3.

To Disable IMAP: 

  1. Go to the Services section of the WebAdmin
  2. Select the IMAP tab
  3. Delete all listeners

To Disable POP3:

  1. Go to the Services section of the WebAdmin
  2. Select the POP3 tab
  3. Delete all listeners 

Note: You can also stop these services from Services Management.

2. Disable Greylisting

Next, you need to disable Greylisting. To do so:

  1. Navigate to the Security & FilteringAcceptance & RoutingAcceptance Basic Settings section of the Axigen WebAdmin
  2. Scroll down, past Basic Policies, to the Greylisting subsection
  3. Untick Activate Greylisting

3. Disable SPF Checks 

After you’re done with the previous 2 steps, you need to disable SPF checks:

  1. Go to Security & FilteringAdditional AntiSpam Methods
  2. Scroll to the SPF (Sender Policy Framework) subsection
  3. Make sure all SPF options are unchecked

4. Performance Tuning Your SMTP Relay 

We have prepared a total of 7 ways of tuning up your Axigen mail server for optimal performance as an SMTP relay, plus an optional step to configure Axigen as a log server.

Of course, some of the configuration changes suggested here are optional based on your specific use case — so please double-check to make sure you’re not changing something you need.

  1. Under Security & FilteringAcceptance & RoutingAcceptance Basic Settings, set wait for mail processing at most — 0 seconds.
  2. Under ServicesSMTP Receiving, edit the listener you will be using to inject the messages in Axigen, then uncheck the Enable Flow Control for this listener option
  3. Under ServicesSMTP ReceivingFlow Control sub-section, set the 4 connection number parameters to 0
  4. Under ServicesDNR:
    1. set the First Query Timeout to 1 second wherever it appears 
    2. Set the max number of retries to 3 wherever it appears
    3. Increase No. of cached results to 10000
    4. If possible use local DNS servers with fast response times
  5. Under Security & FilteringAntiVirus & AntiSpamSupported Applications, disable any filter that is not needed.
  6. Under QueueProcessingEmail Delivery
    Reduce the max number of retries so that the messages are not retained in the queue for 4 days in case of temporary errors. Depending on your requirements you may adjust this parameter, for example with 8 retries and the other parameters set as default, you get around 18 hours.
     

    Note: changing these parameters requires the Axigen service to be restarted in order for the new values to become effective.

     

  7. If you do not need to send messages on IPv6, make sure the parameter is disabled in CLI:

    $ telnet 127.0.0.1 7000

     

    <login> user admin
    <password> [your_admin_password]
    For a list of available commands, type HELP
    +OK: Authentication successful
    <#> config server
    +OK: command successful
    <server#> config smtp-outgoing
    +OK: command successful
    <server-smtpOutgoing#> show attr enableIPv6
    enableIPv6 = yes
    +OK: command successful
    <server-smtpOutgoing#> set enableIPv6 no
    +OK: command successful
    <server-smtpOutgoing#> commit
    committing changes and switching back to previous context.
    +OK: command successful
    <server#> commit
    committing changes and switching back to previous context.
    +OK: command successful
    <#> save config
    +OK: command successful

Optional Extra Step: Configuring Axigen as a Log Server 

In larger setups, where you would have multiple Axigen SMTP relay instances, you might want to centralize logging for all these instances.  

For Axigen to run as a Log server, you can set up an additional Axigen instance to act as a log server.

Here are the basic steps for configuring Axigen as a log server:

  1. Go to Logging → Log Server Settings in the WebAdmin Interface
  2. Enable the log listener on a real network interface and use 0.0.0.0:2000 for Address:Port for a basic configuration.
  3. Go to Logging Log Collection Rules
  4. Add a new rule to collect messages from -remote host- * and logs from service -All services-, with a suggestive filename, and save your rule.

For more info and instructions on how to configure Axigen to log on a remote host, visit our documentation on Configuring Axigen as a log server

Ready to Relay?

We hope our short guide has been of use to you!

Don’t forget we’re just a few clicks away if you want to reach out to support for aid in setting up your SMTP relay server. After all, this article was the result of a support ticket — so we’re always ready to help tweak your Axigen configuration. And we do love a challenge!