Skip to content

Instantly share code, notes, and snippets.

@palant
palant / README.md
Last active October 2, 2024 12:17
DKIM signing and verification filters for OpenSMTPD

Important

Current version of this code has moved into a proper GitHub repository: https://github.com/palant/opensmtpd-filters

The OpenSMTPD documentation currently suggests using either opensmtpd-filter-dkimsign or opensmtpd-filter-rspamd for DKIM support. The former lacks functionality and requires you to compile code from some Austrian web server yourself. The latter is overdimensioned for my needs. So I’ve written my own fairly simple filters in Python.

Prerequisites

These filters require Python 3 with dkimpy module installed. You can optionally install pyspf module as well, if you want dkimverify.py to perform SPF verification as well.

Setting up

@palant
palant / like_thread.js
Created November 8, 2019 08:39
Like a Twitter thread
(function()
{
const selector = `
.tweet.ancestor,
.tweet.js-original-tweet,
.ThreadedConversation--selfThread .tweet.descendant
`;
for (let tweet of document.querySelectorAll(selector))
{
if (!tweet.classList.contains("favorited"))
@palant
palant / block.js
Created November 6, 2019 10:58
Mass-block users on Twitter
(async function()
{
let data = new URLSearchParams();
data.set("authenticity_token", document.getElementById("authenticity_token").value);
data.set("challenges_passed", "false");
data.set("handles_challenges", "1");
data.set("impression_id", "");
for (let element of document.getElementsByClassName("js-actionable-user"))
{
data.set("user_id", element.getAttribute("data-user-id"));