some translation to ~sendmail(1)~ was required. Since then the script
has learned to compute the date-dependent file name, compress the log,
convert it to base64, and encapsulate it in MIME format, before
-sending it on to ~sendmail~. Note that there is no encryption (yet).
-This is a low priority because much of the data is available to
-Droplet's ISP's Mom, the NSA/CIA/NWO.
+encrypting and sending to ~sendmail~.
#+CAPTION: [[file:roles_t/abbey-front/files/logrotate-mailer][=roles_t/abbey-front/files/logrotate-mailer=]]
#+BEGIN_SRC sh :tangle roles_t/abbey-front/files/logrotate-mailer
fi
( echo "Subject: $2"
- echo "Content-Type: multipart/mixed; boundary=\"boundary\""
- echo "MIME-Version: 1.0"
echo ""
- echo "--boundary"
- echo "Content-Type: text/plain"
- echo "Content-Transfer-Encoding: 8bit"
- echo ""
- echo "$F"
- echo "--boundary"
- echo "Content-Type: application/gzip; name=\"$F\""
- echo "Content-Disposition: attachment; filename=\"$F\""
- echo "Content-Transfer-Encoding: base64"
- echo ""
- gzip | base64
- echo ""
- echo "--boundary--" ) | sendmail "$3"
+ ( echo "Content-Type: multipart/mixed; boundary=\"boundary\""
+ echo "MIME-Version: 1.0"
+ echo ""
+ echo "--boundary"
+ echo "Content-Type: text/plain"
+ echo "Content-Transfer-Encoding: 8bit"
+ echo ""
+ echo "$F"
+ echo "--boundary"
+ echo "Content-Type: application/gzip; name=\"$F\""
+ echo "Content-Disposition: attachment; filename=\"$F\""
+ echo "Content-Transfer-Encoding: base64"
+ echo ""
+ gzip | base64
+ echo ""
+ echo "--boundary--" ) \
+ | gpg --encrypt --armor \
+ --trust-model always --recipient root@core ) \
+| sendmail root \
+|| exit $?
#+END_SRC
** Install Let's Encrypt
** Archive Let's Encrypt Data
A backup copy of Let's Encrypt's data (=/etc/letsencrypt/=) is sent to
-~root@core~ in S/MIME encrypted email every time it changes. Changes
+~root@core~ in OpenPGP encrypted email every time it changes. Changes
are detected by keeping a copy in =/etc/letsencrypt~/= for comparison.
#+CAPTION: [[file:roles_t/abbey-front/tasks/main.yml][=roles_t/abbey-front/tasks/main.yml=]]
fi
( echo "Subject: $2"
- echo "Content-Type: multipart/mixed; boundary=\"boundary\""
- echo "MIME-Version: 1.0"
echo ""
- echo "--boundary"
- echo "Content-Type: text/plain"
- echo "Content-Transfer-Encoding: 8bit"
- echo ""
- echo "$F"
- echo "--boundary"
- echo "Content-Type: application/gzip; name=\"$F\""
- echo "Content-Disposition: attachment; filename=\"$F\""
- echo "Content-Transfer-Encoding: base64"
- echo ""
- gzip | base64
- echo ""
- echo "--boundary--" ) | sendmail "$3"
+ ( echo "Content-Type: multipart/mixed; boundary=\"boundary\""
+ echo "MIME-Version: 1.0"
+ echo ""
+ echo "--boundary"
+ echo "Content-Type: text/plain"
+ echo "Content-Transfer-Encoding: 8bit"
+ echo ""
+ echo "$F"
+ echo "--boundary"
+ echo "Content-Type: application/gzip; name=\"$F\""
+ echo "Content-Disposition: attachment; filename=\"$F\""
+ echo "Content-Transfer-Encoding: base64"
+ echo ""
+ gzip | base64
+ echo ""
+ echo "--boundary--" ) \
+ | gpg --encrypt --armor \
+ --trust-model always --recipient root@core ) \
+| sendmail root \
+|| exit $?