Skip to content

Instantly share code, notes, and snippets.

View stevejenkins's full-sized avatar

Steve Jenkins stevejenkins

View GitHub Profile
@stevejenkins
stevejenkins / Postfix Postscreen Options
Last active June 17, 2018 20:57
SteveJ's Postfix:Postscreen configuration options
# POSTSCREEN OPTIONS v2017-03-18
postscreen_access_list = permit_mynetworks,
cidr:/etc/postfix/postscreen_access.cidr,
cidr:/etc/postfix/postscreen_spf_whitelist.cidr,
hash:/etc/postfix/postscreen_whitelist
postscreen_blacklist_action = drop
postscreen_dnsbl_action = enforce
postscreen_greet_action = enforce
postscreen_dnsbl_threshold = 3
@stevejenkins
stevejenkins / Postfix SMTPD Restrictions
Last active May 13, 2018 18:20
SteveJ's Postfix SMTPD Restrictions
# SMTPD Restrictions v2015-06-02
# NOTE: Overiding restrictions are in master.cf for submission and other services
smtpd_helo_required = yes
disable_vrfy_command = yes
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
permit_dnswl_client list.dnswl.org=127.0.[2..14].[2..3],
@stevejenkins
stevejenkins / specdiffs
Created December 19, 2013 18:15
Differences between systemd vs. SystemV versions of OpenDKIM spec file for Fedora/EPEL repos
--- OpenDKIM-Fedora/SPECS/opendkim.spec 2013-12-18 19:51:31.927514150 -0800
+++ OpenDKIM-SysV/SPECS/opendkim.spec 2013-12-18 19:51:09.221494149 -0800
@@ -1,6 +1,4 @@
-# systemd-compatible version
-
-%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
+# SystemV-compatible version
Summary: A DomainKeys Identified Mail (DKIM) milter to sign and/or verify mail
Name: opendkim
@stevejenkins
stevejenkins / gwhitelist_pss.sh
Created June 25, 2014 00:51
Google PageSpeed Service RemoteIPInternalProxy generator for mod_remoteip
#! /bin/sh
#
# Based on Mike Miller's gwhitelist at:
# http://archive.mgm51.com/sources/gwhitelist.html
# Copyright (c) 2013 Mike Miller <mmiller@mgm51.com>
#
# Modified 2014 by Steve Jenkins <steve@stevejenkins.com> to format
# output for mod_remoteip on Apache with Google PageSpeed Service
#
# Permission to use, copy, modify, and distribute this software for any
@stevejenkins
stevejenkins / alarmserver
Last active August 29, 2015 14:04
AlarmServer for SmartThings Init Script
#!/bin/sh
# chkconfig: 23456 90 10
# description: AlarmServer
# Middleware between SmartThings and EnvisaLink
# processname: alarmserver.py
# v1.1
# by Steve Jenkins (steve@stevejenkins.com)
workdir=/usr/local/bin/AlarmServer
@stevejenkins
stevejenkins / bash-multipatch.sh
Last active August 29, 2015 14:06
A quick script file for downloading an applying multiple patches when manually compiling GNU bash on Linux. Referenced in this post: http://stevejenkins.com/blog/2014/09/how-to-manually-update-bash-to-patch-shellshock-bug-on-older-fedora-based-systems/
#!/bin/sh
# A quick script file for downloading an applying multiple patches when manually compiling GNU bash on Linux
# Written (mostly) by Steve Cook with (a little) help from Steve Jenkins
# This really seems like a lame way to have to do this, but it works. :) Use at your own risk.
# You can edit these variables
version="4.0"
nodotversion="40"
@stevejenkins
stevejenkins / bash-autopatch.sh
Last active November 24, 2020 12:29
A shell script that fully automates the "manual" patching of GNU Bash, using source and all known official patches. Contributed by Mike Marino, based on Steve Jenkins' manual Bash patching procedure at http://stevejenkins.com/blog/2014/09/how-to-manually-update-bash-to-patch-shellshock-bug-on-older-fedora-based-systems/
#/bin/bash
# bash-autopatch.sh
# A shell script that fully automates the "manual" patching of GNU Bash, using source and all known official patches.
# Contributed by Mike Marino, based on Steve Jenkins' manual Bash patching and compiling procedure at:
# http://stevejenkins.com/blog/2014/09/how-to-manually-update-bash-to-patch-shellshock-bug-on-older-fedora-based-systems/
# This script is a "continuation" of Steve Cook's bash-multipath.sh at: https://gist.github.com/stevejenkins/3d64d3543060c1bcac92
# Version 1.0 - October 10, 2014
@stevejenkins
stevejenkins / meteobridge.sql
Last active April 17, 2021 14:18
An example database structure and query to push weather data from a MeteoBridge device into a MySQL database.
-- Example MySQL Database Structure and Query for MeteoBridge Push Services
-- version 1.1 (Feb 13, 2015)
-- http://www.stevejenkins.com/
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `meteobridge`
--
@stevejenkins
stevejenkins / opendmarc.conf
Created March 7, 2015 15:59
Draft default opendmarc.conf for Fedora-based pacakges
##
## opendmarc.conf -- configuration file for OpenDMARC filter
##
## Copyright (c) 2012-2015, The Trusted Domain Project. All rights reserved.
##
## AuthservID (string)
## defaults to MTA name
##
## Sets the "authserv-id" to use when generating the Authentication-Results:
@stevejenkins
stevejenkins / opendmarc-send-reports.sh
Last active May 21, 2018 01:23
Imports data from OpenDMARC's opendmarc.dat file into a local MySQL DB and sends DMARC failure reports to domain owners.
#!/bin/bash
# Imports data from OpenDMARC's opendmarc.dat file into a local MySQL DB
# and sends DMARC failure reports to domain owners.
# Based on a script from Hamzah Khan (http://blog.hamzahkhan.com/)
set -e
# Database and History File Info
DBHOST='localhost'
DBUSER='opendmarc'