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

**URL:** https://forum.yunohost.org/t/share-your-hooks-to-apply-custom-configurations-partagez-vos-hooks-pour-appliquer-des-configurations-personnelles/17235
**Category:** Tutorials
**Tags:** french, english
**Created:** [September 20, 2021, 9:36pm UTC](https://forum.yunohost.org/t/share-your-hooks-to-apply-custom-configurations-partagez-vos-hooks-pour-appliquer-des-configurations-personnelles/17235 "2021-09-20T21:36:03Z")
**Posts on this page:** 1
**Showing post:** 52

<div class="post-metadata">

### Author: ![metyun](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/f14d63/32.png) [@metyun](https://forum.yunohost.org/u/metyun)
#### Post date: [January 12, 2025, 9:12pm UTC](https://forum.yunohost.org/t/share-your-hooks-to-apply-custom-configurations-partagez-vos-hooks-pour-appliquer-des-configurations-personnelles/17235/52 "2025-01-12T21:12:55Z")

</div>

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**

```auto
#!/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

```

---

_[View the full topic](https://forum.yunohost.org/t/share-your-hooks-to-apply-custom-configurations-partagez-vos-hooks-pour-appliquer-des-configurations-personnelles/17235)._
