There is also a new setting to restrict the webadmin access:
yunohost settings set security.webadmin.allowlist -v <comma-separated list of IP addesses>
yunohost settings set security.webadmin.allowlist.enabled -v True
Thanks a lot for describing and sharing your hooks!
I didn’t know about hooks before and had already modified some system configuration files (and documented the modifications to be able to redo them after system updates).
Using hooks instead makes these custom configurations much easier.
Well, I guess the setting I needed (smtp_address_preference = ipv4) introduces a subcase of what allow_ipv6 manages (inet_protocols = ipv4). I.e., we can still receive mail over ipv6 but will prefer ipv4 for sending, whereas inet_protocols is just switching off ipv6 AFAIU. Thanks anayway.
Bonjour, j’ai tenté de créer un hook pour modifier les fichiers /etc/postfix/main.cf et /etc/postfix/master.cf afin de ralentir les envois vers certains serveurs comme orange.fr
Est-ce que ça vous semble correct?
#!/bin/bash
# Avant tout j ai créé un fichier /etc/postfix/transport listant les serveurs pour lesquels je veux ralentir l envoi:
# orange.fr slow;
# free.fr slow;
# domain.tld slow;
action=$1
pending_dir=$4
postfix_main_conf=$pending_dir/../postfix/etc/postfix/main.cf
postfix_master_conf=$pending_dir/../postfix/etc/postfix/master.cf
[[ "$action" == "pre" ]] || exit 0
[[ -e $postfix_main_conf ]] || exit 0
[[ -e $postfix_master_conf ]] || exit 0
echo '
transport_maps = hash:/etc/postfix/transport
slow_initial_destination_concurrency=1
slow_destination_concurrency_limit=1
slow_destination_rate_delay=5' >> $postfix_main_conf
echo '
slow unix - - n - 5 smtp
-o syslog_name=postfix-slow
-o smtp_destination_concurrency_limit=1
-o slow_destination_rate_delay=5' >> $postfix_master_conf
Salut @Poine
Je suis aussi la discussion sur le forum chatons… comment est configurer ton fichier /etc/postfix/transport/ ? avec les lignes commentée au début ?
orange.fr slow;
free.fr slow;
domain.tld slow;
Sur la doc du wiki c’était come cela, du coup j’ai un doute…
après il faut trouver les bonnes configurations pour que ça marche…
que penser de ce bug dans mes logs ? warning: database /etc/postfix/transport.db is older than source file /etc/postfix/transport