mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
c6ae3ea2f3
Uses doveadm mailbox cryptokey on create user / password change to adjust user encryption key. https://doc.dovecot.org/configuration_manual/mail_crypt_plugin/
14 lines
344 B
Bash
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"
|