Thursday, October 28, 2021

Re: use pfctl to reread /etc/mail/spamd-white table

On Thu, Oct 28, 2021 at 11:55:33AM +0200, Harald Dunkel wrote:
> Hi folks,
>
> my pf.conf contains
>
> table <spamd-white> persist file "/etc/mail/spamd-white"
>
> I understand that I can add and delete hosts from the table manually
> later, but on very large tables this is pretty painful. There is a high
> risk that the table has just been flushed and is not up-to-date yet,
> while the next EMail comes in.
>
> Would it be possible to add some magic to pfctl -T to reread the whole
> table from file and hand it off to pf in an atomic operation?

From the man page:

For the add, delete, replace, and test commands, the list of
addresses can be specified either directly on the command
line and/or in an unformatted text file, using the -f flag.

So:

pfctl -t spamd-white -T add -f /etc/mail/spamd-white

should do it.

>
> Regards
> Harri
>

--

No comments:

Post a Comment