Relay server, DNS lookup and SMTP Routing
Posted by Gary Garber, Last modified by Marek Puverle on 14 May 2015 07:53 AM

Relay server, DNS lookup and SMTP Routing 


Nowadays , unfortunately, it is not rare for a remote system to reject emails from you. If you check the SMTP logs, you will note that right after you connect to a remote system to send an e-mail, you are disconnected, which usually indicates the remote system is blocking your IP. Other times, your server's IP might be listed on some DNSBL. There are even systems that block emails from an entire country, based on their IP.


Icewarp has two options which are very useful. First of all, it's important to note that Icewarp is usually set up to send out mail using DNS lookups (Use DNS Lookup).  You can find it under the Main Menu > Mail > General > Delivery tab, as see in screen below:

 DNS Look


 This means that Icewarp will query the DNS servers specific in System/Internet connection to find out remote system's MX and connect to it directly, to send outbound mail.

 If you are using this method, but your ISP is blocked at a specific destination, you can route all emails to that specific destination/domain through another SMTP server, which has a different outgoing IP. This is done with an option called Routing, found in Main Menu > Mail > General > Routing tab, as seen below:

 SMTP Routing



 The best way to set up SMTP routing is by clicking on the Edit file button, so you are editing the configuration file directly with notepad. On the top part of the Window, you should see comments and a comment button, so you can show/hide comments. Note the included examples.


 If you want to route all emails destined to via another SMTP server (let's say, the syntax is:;;


 If you want to redirect all emails to via SMTP server, just change the line shown above, replacing the 2 places where appears with

 Note that, for this to work, must be set to accept message relaying for your main server's IP (which is sending out mail using for this specific domain only). If it's a Icewarp at, it has to have the main Icewarp's IP in Main Menu > Mail > Security > Trusted IPs & Hosts


Mail Trusted


 An alternative is to use SMTP AUTH, so you can basically send out mail using any account that you have on an ISP, for example, that accepts SMTP authentication. The syntax is as follows if your ISP requires you to authenticate with just your username (what is to the left of the @ sign):;;


If your authentication is done with full email, the syntax is:;;


 After you do the changes described above, be sure to restart the SMTP service (System > Service) and check your SMTP logs to be sure emails to these destinations are being relayed correctly.

 Another nice option in Icewarp is the possibility to try to send all messages that were not successfully sent by your main mail server, through another SMTP server.

 To use this option, in Main Menu > Mail > General > Delivery tab, keep the radio button Use DNS lookup active, however, fill out an alternative mail server in the Use relay server field and mark the checkbox Deliver messages via relay server when direct delivery fail's

 This means that all messages which couldn't be sent by your main server, such as mailbox full at destination, account doesn't exist or blocked on a DNSBL, are sent to the relay server, so it can try.

 In this field, you can specify an IP, however, it must that IP/relay server must be set to accept connections/relaying from your Icewarp. You can also SMTP AUTH. The syntax if you want to SMTP AUTH with just your username is: <username>:<password>@<MyISPhostname>

 So, for example:

 If you need to SMTP AUTH with your full email, the syntax is:



 So, for example:

 If the syntax above does not work, replace the % after word username with a @.

 Check your SMTP logs to understand how SMTP authentication works and how to decode it.

 After doing these changes, restart your SMTP service and be sure to check your logs and your relay server's logs, to be sure messages are being sent our correctly.


Updated 23.07.2014, by Valentin