cd /etc/rspamd
- create
rspamd.conf.local
- create lists:
touch local_bl_from.map.inc local_bl_ip.map.inc local_bl_rcpt.map.inc \
local_wl_from.map.inc local_wl_ip.map.inc local_wl_rcpt.map.inc
- change permissions:
# adapted from Java: | |
# https://github.com/Yubico/yubikey-salesforce-client/blob/ | |
# e38e46ee90296a852374a8b744555e99d16b6ca7/src/classes/Modhex.cls | |
ALPHABET = 'cbdefghijklnrtuv' | |
def yubikey_otp_to_serial(otp): | |
""" Takes a Yubikey OTP and calculates the serial number of the key. |
The good news: you can get it running on the free tier (with a tiny instance).
The bad news: it's stuck on Elasticsearch 1.5.2 and dynamic scripting (Groovy) is disabled.
http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/aes-limits.html
Authentication: the safest option is to create a brand new IAM user (using the tool at https://console.aws.amazon.com/iam/home?region=us-east-1 ) with its own access key and secret key. Then when you create the Elasticsearch instance you can paste in the following IAM string:
#!/usr/bin/env python | |
import sys | |
import json | |
from boto.s3.connection import S3Connection | |
from boto.s3.prefix import Prefix | |
from boto.s3.key import Key | |
bucketname = sys.argv[1] | |
delimiter = '/' |
#!/bin/bash | |
# Example Script to forward ssh-agent socket into an unprivileged lxc | |
# This allows access to the ssh-agent by commands executed with lxc-attach | |
set -m | |
CONTAINER=$1 # e.g., test-container | |
REMOTE=$2 # e.g, [email protected] |
#!/usr/bin/env python | |
import argparse | |
import os | |
import prettytable | |
from novaclient.v1_1 import client as novaclient | |
OS_USERNAME = os.environ['OS_USERNAME'] | |
OS_PASSWORD = os.environ['OS_PASSWORD'] |
#!/bin/bash | |
# Slack notification script for Munin | |
# Mark Matienzo (@anarchivist) | |
# | |
# To use: | |
# 1) Create a new incoming webhook for Slack | |
# 2) Edit the configuration variables that start with "SLACK_" below | |
# 3) Add the following to your munin configuration: | |
# |
# lib/puppet/parser/functions/pw_hash.rb | |
module Puppet::Parser::Functions | |
newfunction(:pw_hash, type: :rvalue) do |args| | |
raise Puppet::ParseError, "pw_hash takes exactly two arguments, #{args.length} provided" if args.length != 2 | |
# SHA512 ($6), default number of rounds (5000) | |
# rounds could be specified by prepending rounds=<n>$ parameter before the salt, i.e. | |
# args[0].crypt("$6$rounds=50000$#{args[1]}") | |
args[0].crypt("$6$#{args[1]}") | |
end |
code[1] define[EPERM] str[Operation not permitted] | |
code[2] define[ENOENT] str[No such file or directory] | |
code[3] define[ESRCH] str[No such process] | |
code[4] define[EINTR] str[Interrupted system call] | |
code[5] define[EIO] str[Input/output error] | |
code[6] define[ENXIO] str[No such device or address] | |
code[7] define[E2BIG] str[Argument list too long] | |
code[8] define[ENOEXEC] str[Exec format error] | |
code[9] define[EBADF] str[Bad file descriptor] | |
code[10] define[ECHILD] str[No child processes] |
#include <stdio.h> | |
#include <string.h> | |
#include <errno.h> | |
int main(void) { | |
struct error { | |
int code; | |
char *define; | |
}; |