mailfred icon indicating copy to clipboard operation
mailfred copied to clipboard

Add a list of allowed email addresses for processing messages

Open mmsfttk opened this issue 6 months ago • 1 comments

Is it possible to implement a kind of white list of email addresses?

The idea is to route email messages that come from an allowed list of email addresses and drop all the other messages.

I am not looking for something fancy, maybe passing the list as argument to the main pub async fn serve<S: Clone + Send + 'static> function.

mmsfttk avatar Jul 11 '25 00:07 mmsfttk

Hi!

IIUC. It could be implemented easily with a custom Layer. The layer could be configure with a whitelist and if the email is not in the list, then it would return the same request with empty header in map_request(), avoiding the message to being enrouted by your routes

lemunozm avatar Jul 14 '25 08:07 lemunozm