On 09.08.2022 17:19, Quelrond wrote:
Hi,
I'm using OpenSMTPD on FreeBSD (in jails) as local SMTP relays for
several applications.
Actually, I use file table as a source of information about valid
senders IP:
...
table senders_static file:/usr/local/etc/mail/senders-static
...
match from src <senders_static> for any action
remote_delivery_via_relay_1
...
Now I want to search for current list dynamically using an external
source of information. As I use Consul, it would perfect to query
consul server(s) with http(s) requests and get the servers list from
the received JSON data. Unfortunately, I cannot find the information
about creating a new type of table, something like:
table senders_consul
consul:http://consul1.domain.local:8080?service=myapp
Could someone assist me in such task, please?
Peter
Hello!
You'll want to have a look at table-procexec and may write your own backend.
table-procexec is still a work in process however.
https://poolp.org/posts/2020-05-28/may-2020-opensmtpd-6.7.1p1-release-table-procexec-and-many-pocs/
https://github.com/OpenSMTPD/OpenSMTPD-extras/tree/table-procexec
Good luck
Reio