Proxmox alert configuration via gmail

A short list to configure Proxmox VE to send alert using Gmail account;

#--------- Proxmox email configuration -------------

# Install authentication libraries
apt-get install libsasl2-modules

Configure app passwords on your Google account

https://myaccount.google.com/apppasswords

# Configure postfix
echo "smtp.gmail.com <youremail>@gmail.com:<app-password>"> /etc/postfix/sasl_passwd

# update permissions
chmod 600 /etc/postfix/sasl_passwd

# hash the file
postmap hash:/etc/postfix/sasl_passwd


# check to to be sure the db file was create
cat /etc/postfix/sasl_passwd.db

# edit postfix config
nano /etc/postfix/main.cf

# google mail configuration

relayhost = smtp.gmail.com:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_security_options =
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_CAfile = /etc/ssl/certs/Entrust_Root_Certification_Authority.pem
smtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_tls_session_cache
smtp_tls_session_cache_timeout = 3600s

# reload postfix
postfix reload

# send a test emails
echo "This is a test message sent from postfix on my Proxmox Server" | mail -s "Test Email from Proxmox" <your-email>@gmail.com
date | mail -s “test” <your-email>@gmail.com

# Now, fix from name in email

# install dependency
apt update
apt install postfix-pcre

# edit config
nano /etc/postfix/smtp_header_checks

# add the following text
/^From:.*/ REPLACE From: pvetower-alert pvetower-alert@<your-email>.com

# hash the file
postmap hash:/etc/postfix/smtp_header_checks

# check the contents of the file
cat /etc/postfix/smtp_header_checks.db

# add the module to our postfix config
nano /etc/postfix/main.cf

# add to the end of the file
smtp_header_checks = pcre:/etc/postfix/smtp_header_checks

# reload postfix service
postfix reload


# send a test emails
date | mail -s “test” <your-email>@gmail.com

--done

References

# steps reference list;
https://docs.technotim.live/posts/proxmox-alerts/
https://forum.proxmox.com/threads/proxmox-setup-for-gmail.13405/

Intel NUC’s on edge – Case Study

Edge computing, the idea of having cloud-native resources at the edge of a network, is an emerging concept in IT, and it’s having an impact at fast food restaurant chain Chick-fil-A. The restaurant chain is also making use of the open-source Kubernetes container orchestration system and the concept of GitOps to help manage its edge deployments with a DevOps approach.

Read more here

Yellow triangle in Visual Studio Package References

There are so many different reasons of getting this generic error. My particular use case is impacted by gitignore file. The project is configured to use package configuration and the lib (dll) were ignored in gitignore file.

I had a working solution on my local. I commited this solution to ADO main. I went to ADO and created a working branch from main branch. I open working branch and started getting these yellow triangles.

I decided to use MVC package as a test case. These are working solution lib files;

These are not working solution lib files (branch created from main).

You can see “System.Web.Mvc.dll” is missing in second picture.

How did I fix it?

The simplest way is to go to main branch in ADO and delete packages folder;

  1. Clone the repository locally
  2. Make the changes to the local version
  3. Commit the changes locally
  4. Push the changes back up to the GitHub repository

Goto each file and select Git and Add;

The folder will be back in the view;

Make sure to comment this line in gitignore file;

# NuGet Packages
# *.nupkg
# The packages folder can be ignored because of Package Restore
# SHAHZAD - Don't uncomment this line
# **/packages/*
# except build/, which is used as an MSBuild target.
# !**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files
# *.nuget.props
# *.nuget.targets

Problem solved.

What is X.509 certificate?

X.509 is a standard format for public key certificates, digital documents that securely associate cryptographic key pairs with identities such as websites, individuals, or organizations.

First introduced in 1988 alongside the X.500 standards for electronic directory services, X.509 has been adapted for internet use by the IETF’s Public-Key Infrastructure (X.509) (PKIX) working group

Common applications of X.509 certificates include:

  1. SSL/TLS and HTTPS for authenticated and encrypted web browsing
  2. Signed and encrypted email via the S/MIME protocol
  3. Code signing
  4. Document signing
  5. Client authentication
  6. Government-issued electronic ID

For more info, read below;

X.509 FAQ

Hosting multiple domain under one app service

Azure DevOps .NETFramework Version not found

Running build pipeline for a web application targeting .NETFramework Version 4.6.1 using 2022 build agent, I have received this error;

The reference assemblies for .NETFramework,Version=v4.6.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks 

The solution is to change the build agent to 2019.