diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-06-23 21:04:55 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-06-29 15:14:43 +0200 |
commit | a929614f94d11a4f397e72e74f38b3212c24cdee (patch) | |
tree | a81b3cee45586d685c1b7c6e5c39372f203aa00d /modules/private/mail/sieve_bin | |
parent | 53fa9f9e7d87835d6137a029fe80b3195e635797 (diff) | |
download | Nix-a929614f94d11a4f397e72e74f38b3212c24cdee.tar.gz Nix-a929614f94d11a4f397e72e74f38b3212c24cdee.tar.zst Nix-a929614f94d11a4f397e72e74f38b3212c24cdee.zip |
Configure mail (dovecot, postfix, spam checks)
Diffstat (limited to 'modules/private/mail/sieve_bin')
-rwxr-xr-x | modules/private/mail/sieve_bin/imapsieve_copy | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/private/mail/sieve_bin/imapsieve_copy b/modules/private/mail/sieve_bin/imapsieve_copy new file mode 100755 index 0000000..2ca1f23 --- /dev/null +++ b/modules/private/mail/sieve_bin/imapsieve_copy | |||
@@ -0,0 +1,8 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | # Inspired from https://docs.iredmail.org/dovecot.imapsieve.html | ||
3 | |||
4 | MSG_TYPE="$1" | ||
5 | OUTPUT_DIR="/var/lib/vhost/.rspamd/${USER}/pending/${MSG_TYPE}" | ||
6 | FILE="${OUTPUT_DIR}/$(date +%Y%m%d%H%M%S)-${RANDOM}${RANDOM}.eml" | ||
7 | mkdir -p "${OUTPUT_DIR}" | ||
8 | cat > ${FILE} < /dev/stdin | ||