mailfred
mailfred copied to clipboard
Add a list of allowed email addresses for processing messages
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.
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