#!/bin/sh
martin='Martin Sebald <msebald@hot-chilli.net>'
kirst='Kirst Timo <tkirst@hot-chilli.net>'
for f ; do
	sed -i /otr-help.cypherpunks.ca/d "$f"
	sender="$(printf '%s' "$f" | sed "s_.*chat/im/jabber/[^/]*/\([^/]*\)/.*_\1_")"
	recipient="$(printf '%s' "$f" | sed "s_.*chat/im/jabber/\([^/]*\)/.*_\1_")"
	subject="XMPP spam from $sender to $recipient"
	body="Hi folks,

I've attached the log of some XMPP spam I recieved from the Jabber/XMPP
$sender account. Seems that it is compromised."
	xdg-email --attach "$f" --subject "$subject" --body "$body" "$martin" "$kirst"
done
mutt -f ~/mail/.spam/
