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

Step 4: sendEmail / STunnel / Windows Notification / Test


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
  1. 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.


  1. Repeat the process for Shutdown, replacing the parameter text with SHUTDOWN.
  2. Test the solution by either rebooting the VM or rebooting Proxmox. Check your email.

 

Video

 

Link

SendEmail
    http://caspian.dotconf.net/menu/Software/SendEmail/
Stunnel
    https://www.stunnel.org

 


Follow This, That and (Maybe), the Other:

Comments

Popular posts from this blog

20150628 Giarratana Circular

HOWTO setup OpenVPN server and client configuration files using EasyRSA

Proxmox-NUT Homelab HOWTO : Step 0 : The Proxmox-NUT HomeLab HowTo: Introduction