3 /// `MailDrop` can't find folders to sync because it sends FIND MAILBOXES /*
4 /// which is not understood by modern servers. It instead replaces it with
6 pub fn middleware(input: &[u8]) -> Vec<u8> {
7 let command = String::from_utf8_lossy(input);
8 if command.contains("FIND MAILBOXES /*") {
9 if let Some(tag) = command.split("FIND MAILBOXES /*").next() {
10 let replacement = format!("{} LIST \"\" \"*\"\r\n", tag.trim());
11 debug!("### {replacement}");
12 return replacement.into_bytes();