]> git.immae.eu Git - perso/Immae/Config/Nix.git/blame_incremental - modules/private/mail/sieve_bin/imapsieve_copy
Fix Backup mailboxes expunging
[perso/Immae/Config/Nix.git] / modules / private / mail / sieve_bin / imapsieve_copy
... / ...
CommitLineData
1#!/usr/bin/env bash
2# Inspired from https://docs.iredmail.org/dovecot.imapsieve.html
3
4MSG_TYPE="$1"
5OUTPUT_DIR="/var/lib/vhost/.rspamd/${USER}/pending/${MSG_TYPE}"
6FILE="${OUTPUT_DIR}/$(date +%Y%m%d%H%M%S)-${RANDOM}${RANDOM}.eml"
7mkdir -p "${OUTPUT_DIR}"
8cat > ${FILE} < /dev/stdin