Trouble with spamhaus marking any mail as spam

Hello, to do it with a webhook it should like this

First keep back to the original postfix main.cf with a regen-conf

yunohost tools regen-conf -n -d
yunohost tools regen-conf --force

Then edit the hook

mkdir /etc/yunohost/hooks.d/conf_regen
touch /etc/yunohost/hooks.d/conf_regen/70-postfix_customhook
nano /etc/yunohost/hooks.d/conf_regen/70-postfix_customhook

with the editor nano you should add this

#!/bin/bash

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

[[ "$action" == "pre" ]] || exit 0
[[ -e $postfix_main_conf ]] || exit 0

sed -e 's/^[^#].*reject_rbl_client zen.spamhaus.org,/    reject_rbl_client zen.spamhaus.org=127.0.0.[2..9],/' \
    -i $postfix_main_conf

and try the regen-conf

yunohost tools regen-conf -n -d

if it’s ok

yunohost tools regen-conf --force
2 Likes