<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Email on nagg.eu</title><link>https://nagg.eu/tags/email/</link><description>Recent content in Email on nagg.eu</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 10 Aug 2018 10:22:56 +0000</lastBuildDate><atom:link href="https://nagg.eu/tags/email/index.xml" rel="self" type="application/rss+xml"/><item><title>Generate a secure GPG key</title><link>https://nagg.eu/generate-a-secure-gpg-key/</link><pubDate>Fri, 10 Aug 2018 10:22:56 +0000</pubDate><guid>https://nagg.eu/generate-a-secure-gpg-key/</guid><description>&lt;p&gt;For some reason &lt;code&gt;gpg gen-key&lt;/code&gt; still defaults to SHA1 and RSA2048, due to the known weaknesses of SHA1 it is probably a better idea to use SHA256.&lt;br&gt;
First of all, we need to create a configuration file.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;cat ~/.gnupg/gpg.conf&amp;#34;
---
personal-digest-preferences SHA256
cert-digest-algo SHA256
default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To generate a new key type (also specify to use RSA 4096):&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;gpg --gen-key
### or
gpg --full-generate-key
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Other useful commands are:&lt;/p&gt;</description></item><item><title>Pacman email updates notification</title><link>https://nagg.eu/pacman-email-updates-notification/</link><pubDate>Mon, 13 Apr 2015 18:54:24 +0000</pubDate><guid>https://nagg.eu/pacman-email-updates-notification/</guid><description>&lt;p&gt;Pacman as long as I know does not provide any method for sending an email notification when there are updates available.&lt;br&gt;
SSH into the Arch box just to find out if there are updates available is really annoying so I wrote a simple bash script to do the dirty work on my behalf.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;[root@arch ~]# cat /etc/cron.daily/check4updates.sh 
#!/bin/bash

HOST=hostname
DOMAIN=domain
SUBJECT=&amp;#34;System update: $HOST@$DOMAIN&amp;#34;
EMAIL_ADDR=&amp;#34;name@domain&amp;#34;

### Query pacman for available updates
updates_raw=$(pacman -Syu &amp;lt;&amp;lt;&amp;lt; n)

if echo $updates_raw | grep &amp;#34;there is nothing to do&amp;#34;
then
	echo Everything is up to date
else
	updates=${updates_raw#*Packages ([1-9])}

	### extract packages update list
	up_raw=${updates%Total Download*}
	up=$(echo $up_raw | tr &amp;#39; &amp;#39; &amp;#39;\n&amp;#39;)
	#echo -e &amp;#34;$up&amp;#34; &amp;gt; report.txt

	### extract update size
	us=${updates#*Total Download*}
	#echo -e &amp;#34;\nTotal Download $us&amp;#34; &amp;gt;&amp;gt; report.txt

	### compose email
	email_text=&amp;#34;New updates available for host $HOST\n\n$up\n\nTotal Download$us&amp;#34;
	echo -e &amp;#34;$email_text&amp;#34; | mail -s &amp;#34;$SUBJECT&amp;#34; &amp;#34;$EMAIL_ADDR&amp;#34;
fi
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To schedule the cron job to run everyday at 1 am edit the following files:&lt;/p&gt;</description></item></channel></rss>