Proxmox-NUT Homelab HOWTO — Step 4 : sendEmail / STunnel / Windows Notification / Test

Alan C. Bonnici
2 min readAug 3, 2024

--

Download and extract sendEmail

  1. Download sendEmail zip file from http://caspian.dotconf.net/menu/Software/SendEmail/ and extract it to a folder. Extract the zip file to the folder c:\sendEmail.

Download and install Stunnel and review Gmail SMTP settings

  1. Download STunnel and install it. Accept defaults. STunnel comes preconfigured to connect to Gmail. The STunnel service will listen on port 25.

2. Install the STunnel service, by clicking on the option stunnel Service Install in the stunnel menu.

3. Run the STunnel service, by clicking on the option stunnel Service Start in the stunnel menu.

4. Create a command file calling it cmd with the following:

C:\sendEmail\sendEmail.exe -s 127.0.0.1:25 -f <your gmail email> -xu <your gmail email> -xp <your gmail app password> -t <recipient_email_addr> -u “Proxmox-NUT VM 100 has %1” -m “For Information Purposes” -o tls=auto

5. Test out the solution by entering the command below. Check your email.

C:\sendEmail\Email.cmd TEST

Configure Windows Startup and Shutdown Scripts

  1. Open Group Policy. Expand Computer Configuration and Windows Settings. Click on the option Scripts (Startup/Shutdown).

2. Double click on Startup. Under Script Name browse to the cmd file. For Script Parameter enter STARTED.

3. Repeat the process for Shutdown, replacing the parameter text with SHUTDOWN.

4. Test the solution by either rebooting the VM or rebooting Proxmox. Check your email.

Video

Links

SendEmail
http://caspian.dotconf.net/menu/Software/SendEmail/

Stunnel
https://www.stunnel.org

--

--

Alan C. Bonnici
Alan C. Bonnici

Written by Alan C. Bonnici

30+ years' experience in the field of IT and Tech, Services and Education industries.

No responses yet