How can I pull local_domains from table.sql_query
- Lenguaje dominante
- Go
- Estrellas
- 6.1k
- Forks
- 327
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
# Use case
I am building a systme where I add domains to maddy via api. I have already built the api part (if anyone finds this useful I'm happy to share). Now I'd like to, inatead of passing local_domains via ENV, read them from a postgres table, in a way that I do not need to restart maddy to make these domains visible to the modules.
Note alternatives you considered and why they are not useful.
# Your idea for a solution
Tried this
```
table.sql_query allowed_domains {
driver postgres
named_args no
dsn "postgres dsn"
lookup "SELECT domain FROM domains where domain = $1"
list "SELECT domain FROM domains"
}
whatever {
modify {
dkim {
domains $(primary_domain) $(local_domains) &allowed_domains
selector default
key_path dkim-keys/{domain}-{selector}.key
sig_expiry 120h # 5 days
hash sha256
newkey_algo rsa2048
}
}
}
```
How your solution would work in general?
Did not, domains are not in the list
- [x ] I'm willing to help with the implementation
Guía de contribución
Línea de trabajo
No se nombran archivos ni pruebas; empieza rastreando el manejo de la configuración de table.sql_query, local_domains y las búsquedas respaldadas por PostgreSQL. Determina cómo la API existente y la configuración del módulo actualizan los datos, y define la finalización como hacer visibles los dominios respaldados por tablas sin reiniciar maddy.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- go, postgres
- Área
- backend, databases
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100