Some easy instructions for running
EmailRelay 2.0.0 on 127.0.0.1:25 on Windows with an upstream SMTPS server.
- This configuration is for SMTPS and which uses publicly trusted TLS certificates that need to be verified.
- Assumes one is using SMTPS on port 465, change smtp.example.com to your desired SMTPS server.
1) Extract emailrelay-2.0-w64 into C:\NetXMS\emailrelay on the same system as the NetXMS server, change paths to suit your own environment
2) Create spool directory: C:\NetXMS\emailrelay\spool
3) Create config directory: C:\NetXMS\emailrelay\config
4) Place a Trusted CA Certificate bundle into C:\NetXMS\emailrelay\config\cacert.pem (Eg: From Mozilla or
curl for public CAs or you'll need to make your own if your SMTPS server uses certificates signed by an internal CA)
5) Create C:\NetXMS\emailrelay\config\email.auth and put in any relevant
authenticationExample:
client plain netxms@example.com PasswordHere
6) Create batch file to
start emailrelay.exe: C:\NetXMS\emailrelay\start-emailrelay.bat
start "emailrelay" "C:\NetXMS\emailrelay\emailrelay.exe" --interface=127.0.0.1 --interface=127.0.0.1 --port=25 --as-proxy=smtp.example.com:465 --client-auth=C:\NetXMS\emailrelay\config\email.auth --client-tls-connection --client-tls-required --client-tls-server-name=smtp.example.com --client-tls-verify=C:\NetXMS\emailrelay\config\cacert.pem --spool-dir=C:\NetXMS\emailrelay\spool --pid-file=C:\NetXMS\emailrelay\emailrelay.pid --no-syslog
Change smtp.example.com to your desired SMTPS server.
7) Create C:\NetXMS\emailrelay\emailrelay-service.cfg
dir-config="C:\NetXMS\emailrelay\config"
8 ) Run as Administrator to
install service:
C:\NetXMS\emailrelay\emailrelay-service --install
Remember to document the existence of the cacert.pem bundle and the need to manually update it.