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.
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:
- Download the installation kit file
- Run sh <file.run> as root
- The self-extracting shell script will install Axigen
- Axigen will start immediately after installation
- 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:
- Download the installation msi file
- Launch the installer
- Follow the installation wizard
- Perform initial configuration
- 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:
- Go to the Services section of the WebAdmin
- Select the IMAP tab
- Delete all listeners
To Disable POP3:
- Go to the Services section of the WebAdmin
- Select the POP3 tab
- 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:
- Navigate to the Security & Filtering → Acceptance & Routing → Acceptance Basic Settings section of the Axigen WebAdmin
- Scroll down, past Basic Policies, to the Greylisting subsection
- Untick Activate Greylisting
3. Disable SPF Checks
After you’re done with the previous 2 steps, you need to disable SPF checks:
- Go to Security & Filtering → Additional AntiSpam Methods
- Scroll to the SPF (Sender Policy Framework) subsection
- 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.
- Under Security & Filtering → Acceptance & Routing → Acceptance Basic Settings, set wait for mail processing at most — 0 seconds.
- Under Services → SMTP Receiving, edit the listener you will be using to inject the messages in Axigen, then uncheck the Enable Flow Control for this listener option
- Under Services → SMTP Receiving → Flow Control sub-section, set the 4 connection number parameters to 0
- Under Services → DNR:
- set the First Query Timeout to 1 second wherever it appears
- Set the max number of retries to 3 wherever it appears
- Increase No. of cached results to 10000
- If possible use local DNS servers with fast response times
- Under Security & Filtering → AntiVirus & AntiSpam → Supported Applications, disable any filter that is not needed.
- Under Queue → Processing → Email 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.
-
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:
- Go to Logging → Log Server Settings in the WebAdmin Interface
- Enable the log listener on a real network interface and use 0.0.0.0:2000 for Address:Port for a basic configuration.
- Go to Logging → Log Collection Rules
- 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!