Skip to content

Instantly share code, notes, and snippets.

@flat235
flat235 / update-debian-mirror.sh
Created December 17, 2016 14:42
make/update a debian mirror
#!/bin/bash
# configuration
MIRROR='ftp.de.debian.org'
ARCH='i386,amd64'
SECTIONS='main,contrib,non-free,main/debian-installer'
RELEASE='jessie'
@flat235
flat235 / gld.service
Created February 5, 2017 11:51
Systemd Unit for GreyListing Daemon
[Unit]
Description=GreyListing Daemon for postfix
[Service]
Type=forking
ExecStart=/usr/bin/gld
[Install]
RequiredBy=postfix.service
@flat235
flat235 / diymda.pl
Last active February 10, 2017 13:46
diy mail delivery agent (especially for catch-all scenarios)
#!/usr/bin/perl
# assumed folderlayout: somwhere/domain/user
# configure the 'somewhere' in $basedir
# you may also configure the spamdir
#
# this will filter mail in the following way:
# 1. messages marked as spam by spamassassin will be put into the spam subfolder

Keybase proof

I hereby claim:

  • I am flat235 on github.
  • I am flat235 (https://keybase.io/flat235) on keybase.
  • I have a public key ASDLguCt6z3iNJQHnnRVONUGgpMiKJwB0k8T2UFl5LtMDgo

To claim this, I am signing this object:

@flat235
flat235 / elastic-rolling-upgrade.sh
Created March 19, 2019 18:54
rolling upgrade of elasticsearch (debian edition)
#!/bin/bash
# written according to
# https://www.elastic.co/guide/en/elasticsearch/reference/5.6/rolling-upgrades.html
# NO PLUGIN SUPPORT
# Dependencies
# - curl
# - jq
@flat235
flat235 / spamassassin-update.sh
Last active April 26, 2020 19:53
Update spamassassin rules, bayes learning. Script for nightly cronjob.
#!/bin/bash
# where are the maildirs?
MAILROOT=/var/vmail/
DELETEDDIRS='deleted-maildirs'
SPAMDIRS='Spam'
# update rules
sa-update --allowplugins
# compile rules (for speed)
sa-compile --quiet