Santronics Software, Inc.,
Technote: Preparing WcSMTP Host Names

Introduction:

When sending email using wcSMTP, the first command it must issue to the remote smtp server to begin a mail transction is the EHLO command or the HELO command for legacy SMTP server operations:

Your wcSMTP machine IP address: A.B.C.D

    C: EHLO hostname or [ip-literal]

or for legacy remote SMTP servers who don't understand the EHLO command:

    C: HELO hostname

Where the hostname is the public domain name of the computer or if the public host name is not available, the [ip-literal] can be used within square brackets with the EHLO command only. The ip literal field in this case, per the above example, would be [A.B.C.D]. It must match the IP address of the machine making the call.

For modern SMTP servers, the EHLO command is used. For legacy SMTP servers, the HELO command is used. Using EHLO is important, because it provides flexibility to use the ip literal instead of the host name when the host name is not possible or causes a problem delivering mail.

Why must the hostname or ip-literal be correct?

In principle, the hostname should be valid and it should match the reverse lookup of the IP address wcSMTP is using to connect to the remote system. If the [ip-literal] is used, the ip must match the ip of the connecting machine.

While by SMTP "standard law," remote servers are advised to not reject mail if the hostname and ip address do not match, in the name of "Spam Filtering," many servers will perform the check and it may not reject you, but it may add some negative points/scores against your IP reputation. In fact, wcSMTP itself, will reject incoming connections who use the a non-matching [ip-literal] and wcSAP filters may have IP::Domain matching rejection rules called DIP rules.

Many times, these are false positions, and wcSMTP offers ways to set the proper hostname or ip-literal to avoid mail delivery problems.

What hostname will wcSMTP used?

wcSMTP has an automated means of obtaining the host name for the machine connecting to a remote host.

Given the wcSMTP IP address: A.B.C.D, the following logic is used to obtain the host name used for issuing the EHLO command to the remote server:

  1. First check the local machine registry "wcSMTP\A.B.C.D\MailHost" for a hostname,
  2. If none found, perform reverse DNS (rDNS) of A.B.C.D and grab the first hostname,
  3. If a Remost Host setup is found for the target server, it will override the hostname found so far, and
  4. Finally, if none are found, the Primart Host domain name will be used for the hostname.

Again, nothing needs to be done if you have a proper DNS setup for IP addresss, A records for host names and PTR records fo reverse DNS lookups. It will always be 100% correct.

However, if you find you need to hard code a host name for outgoing mail, you can do it two ways:

If a specific remost host is giving you a problem, you can define a Remote Host under wcConfig | Mail Server | SMTP server for the specific target remost host domain and set the EHLO/HELO Client Host field.

If you always want to use that same hostname all the same because you any multiple PTR records, then use the registry method:

   wcregedit /local /value:wcsmtp\A.B.C.D\mailhost /string:HOSTNAME

What about Public/Private Sub-nets and using a NAT?

There might be some public/private sub-net situations where there is a NAT involved. Generally, these are situations where the EHLO hostname may not match the IP address.

These situations may not cause a problem, but it depends on the remote server and whether port 25 or 587 is used. When using port 587 (SUBMIT protocol), there are two basic requirements where the EHLO hostname be valid and correct and the client must authentication (login) and this expressly authorized the server to reject the client. Under port 25, these two items are not required.

But because of NAT situations, wcSMTP, for example, will relax the EHLO hostname requirement when connecting under port 587.

In any case, these might be situations where an [ip-literal] might be useful. If so, you can use the steps described above using the registry setup or using a remote host setup, to define the [A.B.C.D] as the hostname for the machine. The registry method would cover all remote connections:

   wcregedit /local /value:wcsmtp\A.B.C.D\mailhost /string:[A.B.C.D]