Update #15 - Using Gmail App Password to Get Alerts! Date: May 22nd, 2025 Category: Security / Automation Backlink: Update #14 – Auto-Banning Fail2Ban IPs Based on AbuseIPDB Reputation I made a new Gmail account for alerts on my VPS. I created a new app password: I installed a mail alert system via msmtp (Lightweight SMTP Relay Client) with Gmail Support: sudo apt update sudo apt install msmtp msmtp-mta -y I hit no on this screen here: I made a hidden file using this command: sudo nano ~/.msmtprc I filled in my email and app password within the file: I secured the file using: sudo chmod 600 ~/.msmtprc The 600 meaning: 6 = read (4) + write (2) = read/write for the owner 0 = no permission for group 0 = no permission for others I tested the file by echoing myself an email: echo "Success! Email is working." | msmtp -v If you have the app password set up and followed along you will get a email. It should say success on the bottom after running the command: You can now use this to set up alerts for all different kinds of thing which I will do.