You need to do this because you have line of business software or printer/scanner/faxes that need to send emails within a corporate intranet and your email server is hosted offsite.
This doesn’t work with Office 365 acting as the external SMTP server. It should work but there’s something about Office 365’s use of TLS that stops the SMTP relay from authenticating properly in hMailServer. The same problem seems to happen with IIS’s built-in SMTP relay so I think I may have been doing something wrong. In any case, although the main .com.au
’s MX is Office 365, I also have a .net.au
domain hosted on a shared server with a more straightforward (ie less secure) configuration, which I used as the relay.
relay@example.com
.mail.example.com
or wherever the external server is hosted.wildcard
From
, search type Wildcard
, value is *
Send using route to *
intranet
or similar:
192.168.1.0
to 192.168.1.255
)This can be tested by telnetting (or PuTTying) into port 25 of the machine, then sending an email by hand (see Wikipedia’s entry for SMTP for an example). Sending the email by hand is a very easy way to figure out configuration problems on the client-facing side of the SMTP relay and is a skill worth learning - also it makes you look like a boss if anybody nearby understands what you are doing. The email should be sent through the hMailServer SMTP relay, through to the external SMTP server (using the relay email address for authentication), then through to its destination. hMailServer also has pretty good logging which can help figure out any bugs or misconfiguration.