Skip to content

Instantly share code, notes, and snippets.

@ran-deh
ran-deh / mta-sts.js
Created September 19, 2022 21:21 — forked from dotysan/mta-sts.js
CloudFlare Worker for MTA-STS policy
const mode= 'testing';
//const mode= 'enforce';
const max_age= 604800; // 1 week
const mx_list = [
'aspmx.l.google.com'
,'aspmx2.googlemail.com'
,'aspmx3.googlemail.com'
,'aspmx4.googlemail.com'
,'aspmx5.googlemail.com'
,'alt1.aspmx.l.google.com'
@joulgs
joulgs / terminal.txt
Last active July 23, 2024 19:04
How install libssl1.1 on ubuntu 22.04
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
@dotysan
dotysan / mta-sts.js
Created April 29, 2022 19:45
CloudFlare Worker for MTA-STS policy
const mode= 'testing';
//const mode= 'enforce';
const max_age= 604800; // 1 week
const mx_list = [
'aspmx.l.google.com'
,'aspmx2.googlemail.com'
,'aspmx3.googlemail.com'
,'aspmx4.googlemail.com'
,'aspmx5.googlemail.com'
,'alt1.aspmx.l.google.com'
@scottnunemacher
scottnunemacher / dovecot-doveadm-sync.md
Last active April 28, 2024 19:06
Sync (migrate) a Dovecot Email Account from One Dovecot Server to Another

Sync (migrate) a Dovecot Email Account from One Dovecot Server to Another

The man doveadm-sync pages are cryptic and not very well explained, as well they are missing quality real-world examples.

This gist aims to give some clarity and explanation.

Here is the command I got to successfully transfer (and sync backwards too) an email account from an old Dovecot email server to a new Dovecot email server:

To my knowledge, both servers must have a matching account already setup for this to work:

@haisum
haisum / script.sh
Created September 1, 2015 06:10
comment and uncomment lines in bash script via sed
sed -i '/<pattern>/s/^/#/g' file #comment
sed -i '/<pattern>/s/^#//g' file #uncomment
#!/bin/sh
#
# This script is used on a QNAP TS-269 PRO. https://www.en0ch.se/qnap-and-rsync/
#
# You have to change:
# 1. $SHAREUSR
# 2. $EXCLUDES (if you want o change the name of the file servername.excludes)
# 3. $SOURCE & $DESTINATION
# 4. user@yourserver.se for the mysqldump
# 5. --password=SUPERSECRET
@benhartwich
benhartwich / apache-autoconfig
Last active December 12, 2023 20:31
Autoconfig / Autodiscover
<VirtualHost *:80>
ServerAdmin mail@benjaminhartwich.de
ServerName autoconfig.nichteinschalten.de
ServerAlias autoconfig.nichteinschalten.de
DocumentRoot "/var/www/autoconfig/"
<Directory "/var/www/autoconfig/">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all