-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): Skip catch-all for known domains (#1336)
* feat(core): Skip catch-all for known domains * Only skip catch-all for hotmail
- Loading branch information
1 parent
2b63556
commit c40a46c
Showing
9 changed files
with
62 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#[cfg(feature = "headless")] | ||
pub mod hotmail; | ||
pub mod microsoft365; | ||
|
||
/// Check if a MX host is from outlook (includes @hotmail.*, @outlook.* and | ||
/// all Microsoft 365 addresses). | ||
pub fn is_outlook(host: &str) -> bool { | ||
host.to_lowercase() | ||
.ends_with(".mail.protection.outlook.com.") | ||
} | ||
|
||
/// Check if a MX host is an @hotmail.* or @outlook.* email. | ||
/// | ||
/// After some testing, I got: | ||
/// - *@outlook.com -> `outlook-com.olc.protection.outlook.com.` | ||
/// - *@outlook.fr -> `eur.olc.protection.outlook.com.` | ||
/// - *@hotmail.com -> `hotmail-com.olc.protection.outlook.com.` | ||
/// - *@hotmail.fr -> `eur.olc.protection.outlook.com.` | ||
/// - *@hotmail.nl -> `eur.olc.protection.outlook.com.` | ||
/// | ||
/// So it seems that outlook/hotmail addresses end with `olc.protection.outlook.com.` | ||
pub fn is_hotmail(host: &str) -> bool { | ||
host.to_lowercase() | ||
.ends_with(".mail.protection.outlook.com.") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters