Share your "hooks" to apply custom configurations- Partagez vos "hooks" pour appliquer des configurations personnelles

A hook that allow to send mail with group mail aliases (more info with yunohost user group add-mailalias --help:

/etc/yunohost/hooks.d/conf_regen/20-postfix_mailgroup

#!/bin/bash

action=$1
pending_dir=$4
postfix_conf=$pending_dir/../postfix/etc/postfix/main.cf

[[ $action == "pre" ]] || exit 0
[[ -e $postfix_conf ]] || exit 0
sed -i '/Regular Yunohost accounts/a\   ldap:/etc/postfix/ldap-groups.cf,' $postfix_conf