Skip to content

Instantly share code, notes, and snippets.

@craigphicks
craigphicks / sendmail-free-mailgun.sh
Last active July 13, 2018 23:43
Replace "sendmail" with (a link to) the script, and forward all system mails via free Mailgun acct to your chosen external address
#!/bin/bash
# Documentation can be found on either of following blogs (with mirrored content):
# https://pindertek.net/2018/07/04/sendmail-free-mailgun/
# https://craigphicks.github.io/2018/07/04/sendmail-free-mailgun/
# NOTE: root permission required to write to /var/log.
# Choose another log location if that will not be suitable.
Logfile=/var/log/sendmail-dummy.log
if [[ $EUID -ne 0 ]]; then
---
title: Installing HEXO
tags:
- Software
categories:
- Hexo
comments: true
date: 2018-05-14 00:00:00
---
@craigphicks
craigphicks / mgmail.sh
Created April 13, 2018 01:06
Mail Gun API shell script for sending mail
#!/bin/bash
mgmail()
(
dflt_to="xxx@gmail.com"
dflt_froma="xxx@example.com"
dflt_sub="notice from admin"
dflt_text="default text"
mailgun_domain="example.com"
keyfile="./privatekey.txt"