Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic configuration expression support #749

Open
foxcpp opened this issue Jan 25, 2025 · 1 comment
Open

Dynamic configuration expression support #749

foxcpp opened this issue Jan 25, 2025 · 1 comment

Comments

@foxcpp
Copy link
Owner

foxcpp commented Jan 25, 2025

  1. Define evaluation context that is passed across the codebase via context.Context.
  2. Replace some (most?) configuration values with generic dynamic like:
type DynamicString struct {
	...
}

func (ds DynamicString) Evaluate(ctx context.Context) (string, error)
  1. Add support for single-quote escaping in maddy configuration syntax.
modify {
  replace_rcpt expr 'address_username(key)'
}
  1. Define configuration syntax (like above) for dynamic expressions.
@foxcpp
Copy link
Owner Author

foxcpp commented Jan 25, 2025

Possible use for #731

destination_in expr 'address_domain(recipient) in table_query(local_domains, '')' 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant