0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00
postfixadmin/ADDITIONS/postfixadmin-mailbox-postpassword.sh
BotoX c6ae3ea2f3 Suport for dovecot mail-crypt-plugin via new mailbox_postpassword_script hook.
Uses doveadm mailbox cryptokey on create user / password change to adjust user encryption key.
https://doc.dovecot.org/configuration_manual/mail_crypt_plugin/
2021-01-11 21:07:45 +01:00

14 lines
344 B
Bash

#!/bin/bash
# Example script for dovecot mail-crypt-plugin
# https://doc.dovecot.org/configuration_manual/mail_crypt_plugin/
# New user
if [ -z "$3" ]; then
doveadm -o plugin/mail_crypt_private_password="$4" mailbox cryptokey generate -u "$1" -U
exit 0
fi
# Password change
doveadm mailbox cryptokey password -u "$1" -o "$3" -n "$4"