> On 27. Jan 2024, at 14:23, Wietse Venema via Postfix-users
> <postfix-users@postfix.org> wrote:
>
> Aleksandar Ivanisevic via Postfix-users:
>> i would like to have maximal_queue_lifetime (and possibly some
>> other parameters) based on the sender address. So I did the following
>
> This request is unlikely to be implemented. It is one of those
> features that benefit a very small fraction of the pupulation at a
> dispropertionate cost for implementation and maintenance.
>
>> in main.cf
>> sender_dependent_default_transport_maps = hash:/etc/postfix/relay_by_sender
>>
>> in /etc/postfix/relay_by_sender
>> mysender.com smtp:[localhost]:588
>>
>> in master cf
>> 588 inet n - n - - smtpd -o
>> maximal_queue_lifetime=1d -o sender_dependent_default_transport_maps=
>
> maximal_queue_lifetime and sender_dependent_default_transport_maps
> are implemented in different programs. Postfix programs cannot send
> main.cf settings into other Postfix programs. That is not a bug but
> a safety feature.
thanks, thats what I thought. For posterity, I’ve solved it by setting
max_queue_time to whatever my maximum is, and then periodically running custom
script(s) that dequeue early, something like this:
#!bin/bash
export PATH=/usr/sbin:$PATH
find $(postconf -h queue_directory)/deferred -type f | while read qf; do
qid=${qf##*/}
if postcat -h $qf 2>/dev/null | fgrep something
echo "$qid contains something, deleting"
postsuper -d $qid &> /dev/null
fi
done
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org