Skip to content

Instantly share code, notes, and snippets.

@rbewley4
rbewley4 / postfix_dkim.sh
Last active February 21, 2021 00:49
Install DKIM for Postfix on CentOS 6.3 using dkim-milter.
#!/bin/bash
# Prerequisite: (EPEL repository)[http://www.rackspace.com/knowledge_center/article/installing-rhel-epel-repo-on-centos-5x-or-6x]
#
# Usage: postfix_dkim.sh domain selector
#
#
# After the script runs, you will need to create TXT DNS records for the domain key:
# <selector>._domainkey.<domain> IN TXT "copy and paste the content of /etc/mail/dkim-milter/keys/<domain>/<selector>.txt here"
# _domainkey.<domain> IN TXT "o=~"
@rbewley4
rbewley4 / sonicwall.sh
Created December 2, 2013 20:46
Scripting the SonicWall CLI with expect and SSH.
#!/bin/bash
# SonicWall credentials
host="XXXX"
username="admin"
password="XXXX"
# SonicWall CLI configuration
user_pattern="User:"
password_pattern="Password:"