When updating or installing a package on a Debian-based distribution, you can face that alert:
1
W:GPG error:http://ppa.launchpad.net trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C2518248EEA14886
This just means that a signing GPG key is missing or expired on your system. The error is giving you the ID of the missing key that you can use for looking for it on the Ubuntu website:
The PKCS12 format is replacing the old PFX format from Microsoft. This format will allow storage of X.509 private keys and the associated public certificates in a single encrypted file.
So you can extract the key and the certificate in a single common PEM file, you can use this openssl command:
If you want to extract the key and the certificate independently, you can also use the options nocerts/nokeys along with openssl, to extract only one part:
When doing update on a Debian/Ubuntu server, if a package is trying to modify a config file, it’s asking for a manual choice. If you’re trying to try to automate the process, you’d probably like to get rid of that ask and keep the current config file by default.
There is no way to easily automate deployment of Oracle JRE since there is no official repository for most of the linux distros. But there’s still a workaround to automatically download the JRE and install it locally on a server by using command lines.
If you want to execute some special commands, log or make an API call when you’re receiving an email onto your server, you can easily set up this by using procmail. Procmail is designed to filter and sort emails but can make any call you want.
Here, as an example, we will set up a simple call to a python script that will read the content of the mail (headers and body) and put the information into a log file.
1. Install procmail
Depending on the OS you’re using, you should find a package pre-compiled in the common repositories.
For example, on a Debian-based:
1
apt-get install procmail
or on a CentOS-based:
1
yum install procmail
2. Build the python script you want to call to analyze the message
You now have to prepare your script you will execute when receiving an email, that will read and parse the content to log interesting information in a file.
3. Configure your user to pass the mail to your script
So that you can pass rules you want to execute when receiving an email, you need to create a file (hidden) called .procmailrc that will take place in the home directory of the user you want to use.
For example, for executing rules when receiving email to [email protected], you will have to put that file into the home dir like /home/mailuser/.procmailrc