From 2ab39cc7ef60bccdced6f468758c7596aed3f4ee Mon Sep 17 00:00:00 2001 From: link2xt Date: Mon, 5 Feb 2024 21:17:03 +0000 Subject: [PATCH] feat: add wildcard pattern support to provider database --- scripts/create-provider-data-rs.py | 4 +- src/provider.rs | 63 ++- src/provider/data.rs | 693 ++++++++++++++--------------- 3 files changed, 365 insertions(+), 395 deletions(-) diff --git a/scripts/create-provider-data-rs.py b/scripts/create-provider-data-rs.py index 589cd0b904..406e795a96 100755 --- a/scripts/create-provider-data-rs.py +++ b/scripts/create-provider-data-rs.py @@ -220,9 +220,9 @@ def process_dir(dir): process_dir(Path(sys.argv[1])) - out_all += "pub(crate) static PROVIDER_DATA: Lazy> = Lazy::new(|| HashMap::from([\n" + out_all += "pub(crate) static PROVIDER_DATA: [(&str, &Provider); " + str(len(domains_set)) + "] = [\n"; out_all += out_domains - out_all += "]));\n\n" + out_all += "];\n\n" out_all += "pub(crate) static PROVIDER_IDS: Lazy> = Lazy::new(|| HashMap::from([\n" out_all += out_ids diff --git a/src/provider.rs b/src/provider.rs index c79815c6c3..d30d4923f7 100644 --- a/src/provider.rs +++ b/src/provider.rs @@ -215,8 +215,18 @@ pub async fn get_provider_info( /// Finds a provider in offline database based on domain. pub fn get_provider_by_domain(domain: &str) -> Option<&'static Provider> { - if let Some(provider) = PROVIDER_DATA.get(domain.to_lowercase().as_str()) { - return Some(*provider); + let domain = domain.to_lowercase(); + for (pattern, provider) in PROVIDER_DATA { + if let Some(suffix) = pattern.strip_prefix("*") { + // Wildcard domain pattern. + // + // For example, `suffix` is ".hermes.radio" for "*.hermes.radio" pattern. + if domain.ends_with(suffix) { + return Some(provider); + } + } else if pattern == &domain { + return Some(provider); + } } None @@ -226,33 +236,42 @@ pub fn get_provider_by_domain(domain: &str) -> Option<&'static Provider> { /// /// For security reasons, only Gmail can be configured this way. pub async fn get_provider_by_mx(context: &Context, domain: &str) -> Option<&'static Provider> { - if let Ok(resolver) = get_resolver() { - let mut fqdn: String = domain.to_string(); - if !fqdn.ends_with('.') { - fqdn.push('.'); + let Ok(resolver) = get_resolver() else { + warn!(context, "Cannot get a resolver to check MX records."); + return None; + }; + + let mut fqdn: String = domain.to_string(); + if !fqdn.ends_with('.') { + fqdn.push('.'); + } + + let Ok(mx_domains) = resolver.mx_lookup(fqdn).await else { + warn!(context, "Cannot resolve MX records for {domain:?}."); + return None; + }; + + for (provider_domain_pattern, provider) in PROVIDER_DATA.as_slice() { + if provider.id != "gmail" { + // MX lookup is limited to Gmail for security reasons + continue; } - if let Ok(mx_domains) = resolver.mx_lookup(fqdn).await { - for (provider_domain, provider) in &*PROVIDER_DATA { - if provider.id != "gmail" { - // MX lookup is limited to Gmail for security reasons - continue; - } + if provider_domain_pattern.starts_with("*") { + // Skip wildcard patterns. + continue; + } - let provider_fqdn = provider_domain.to_string() + "."; - let provider_fqdn_dot = ".".to_string() + &provider_fqdn; + let provider_fqdn = provider_domain_pattern.to_string() + "."; + let provider_fqdn_dot = ".".to_string() + &provider_fqdn; - for mx_domain in mx_domains.iter() { - let mx_domain = mx_domain.exchange().to_lowercase().to_utf8(); + for mx_domain in mx_domains.iter() { + let mx_domain = mx_domain.exchange().to_lowercase().to_utf8(); - if mx_domain == provider_fqdn || mx_domain.ends_with(&provider_fqdn_dot) { - return Some(provider); - } - } + if mx_domain == provider_fqdn || mx_domain.ends_with(&provider_fqdn_dot) { + return Some(provider); } } - } else { - warn!(context, "cannot get a resolver to check MX records."); } None diff --git a/src/provider/data.rs b/src/provider/data.rs index 8d9dbb082f..8c38733028 100644 --- a/src/provider/data.rs +++ b/src/provider/data.rs @@ -593,7 +593,7 @@ static P_GMX_NET: Provider = Provider { oauth2_authorizer: None, }; -// hermes.radio.md: ac.hermes.radio, ac1.hermes.radio, ac2.hermes.radio, ac3.hermes.radio, ac4.hermes.radio, ac5.hermes.radio, ac6.hermes.radio, ac7.hermes.radio, ac8.hermes.radio, ac9.hermes.radio, ac10.hermes.radio, ac11.hermes.radio, ac12.hermes.radio, ac13.hermes.radio, ac14.hermes.radio, ac15.hermes.radio, ka.hermes.radio, ka1.hermes.radio, ka2.hermes.radio, ka3.hermes.radio, ka4.hermes.radio, ka5.hermes.radio, ka6.hermes.radio, ka7.hermes.radio, ka8.hermes.radio, ka9.hermes.radio, ka10.hermes.radio, ka11.hermes.radio, ka12.hermes.radio, ka13.hermes.radio, ka14.hermes.radio, ka15.hermes.radio, ec.hermes.radio, ec1.hermes.radio, ec2.hermes.radio, ec3.hermes.radio, ec4.hermes.radio, ec5.hermes.radio, ec6.hermes.radio, ec7.hermes.radio, ec8.hermes.radio, ec9.hermes.radio, ec10.hermes.radio, ec11.hermes.radio, ec12.hermes.radio, ec13.hermes.radio, ec14.hermes.radio, ec15.hermes.radio, hermes.radio +// hermes.radio.md: *.hermes.radio, *.aco-connexion.org static P_HERMES_RADIO: Provider = Provider { id: "hermes.radio", status: Status::Ok, @@ -1608,375 +1608,326 @@ static P_ZOHO: Provider = Provider { oauth2_authorizer: None, }; -pub(crate) static PROVIDER_DATA: Lazy> = Lazy::new(|| { - HashMap::from([ - ("163.com", &P_163), - ("aktivix.org", &P_AKTIVIX_ORG), - ("aol.com", &P_AOL), - ("arcor.de", &P_ARCOR_DE), - ("autistici.org", &P_AUTISTICI_ORG), - ("delta.blinzeln.de", &P_BLINDZELN_ORG), - ("delta.blindzeln.org", &P_BLINDZELN_ORG), - ("bluewin.ch", &P_BLUEWIN_CH), - ("buzon.uy", &P_BUZON_UY), - ("c1.testrun.org", &P_C1_TESTRUN_ORG), - ("c2.testrun.org", &P_C2_TESTRUN_ORG), - ("c3.testrun.org", &P_C3_TESTRUN_ORG), - ("chello.at", &P_CHELLO_AT), - ("xfinity.com", &P_COMCAST), - ("comcast.net", &P_COMCAST), - ("dismail.de", &P_DISMAIL_DE), - ("disroot.org", &P_DISROOT), - ("e.email", &P_E_EMAIL), - ("espiv.net", &P_ESPIV_NET), - ("example.com", &P_EXAMPLE_COM), - ("example.org", &P_EXAMPLE_COM), - ("example.net", &P_EXAMPLE_COM), - ("123mail.org", &P_FASTMAIL), - ("150mail.com", &P_FASTMAIL), - ("150ml.com", &P_FASTMAIL), - ("16mail.com", &P_FASTMAIL), - ("2-mail.com", &P_FASTMAIL), - ("4email.net", &P_FASTMAIL), - ("50mail.com", &P_FASTMAIL), - ("airpost.net", &P_FASTMAIL), - ("allmail.net", &P_FASTMAIL), - ("bestmail.us", &P_FASTMAIL), - ("cluemail.com", &P_FASTMAIL), - ("elitemail.org", &P_FASTMAIL), - ("emailcorner.net", &P_FASTMAIL), - ("emailengine.net", &P_FASTMAIL), - ("emailengine.org", &P_FASTMAIL), - ("emailgroups.net", &P_FASTMAIL), - ("emailplus.org", &P_FASTMAIL), - ("emailuser.net", &P_FASTMAIL), - ("eml.cc", &P_FASTMAIL), - ("f-m.fm", &P_FASTMAIL), - ("fast-email.com", &P_FASTMAIL), - ("fast-mail.org", &P_FASTMAIL), - ("fastem.com", &P_FASTMAIL), - ("fastemail.us", &P_FASTMAIL), - ("fastemailer.com", &P_FASTMAIL), - ("fastest.cc", &P_FASTMAIL), - ("fastimap.com", &P_FASTMAIL), - ("fastmail.cn", &P_FASTMAIL), - ("fastmail.co.uk", &P_FASTMAIL), - ("fastmail.com", &P_FASTMAIL), - ("fastmail.com.au", &P_FASTMAIL), - ("fastmail.de", &P_FASTMAIL), - ("fastmail.es", &P_FASTMAIL), - ("fastmail.fm", &P_FASTMAIL), - ("fastmail.fr", &P_FASTMAIL), - ("fastmail.im", &P_FASTMAIL), - ("fastmail.in", &P_FASTMAIL), - ("fastmail.jp", &P_FASTMAIL), - ("fastmail.mx", &P_FASTMAIL), - ("fastmail.net", &P_FASTMAIL), - ("fastmail.nl", &P_FASTMAIL), - ("fastmail.org", &P_FASTMAIL), - ("fastmail.se", &P_FASTMAIL), - ("fastmail.to", &P_FASTMAIL), - ("fastmail.tw", &P_FASTMAIL), - ("fastmail.uk", &P_FASTMAIL), - ("fastmail.us", &P_FASTMAIL), - ("fastmailbox.net", &P_FASTMAIL), - ("fastmessaging.com", &P_FASTMAIL), - ("fea.st", &P_FASTMAIL), - ("fmail.co.uk", &P_FASTMAIL), - ("fmailbox.com", &P_FASTMAIL), - ("fmgirl.com", &P_FASTMAIL), - ("fmguy.com", &P_FASTMAIL), - ("ftml.net", &P_FASTMAIL), - ("h-mail.us", &P_FASTMAIL), - ("hailmail.net", &P_FASTMAIL), - ("imap-mail.com", &P_FASTMAIL), - ("imap.cc", &P_FASTMAIL), - ("imapmail.org", &P_FASTMAIL), - ("inoutbox.com", &P_FASTMAIL), - ("internet-e-mail.com", &P_FASTMAIL), - ("internet-mail.org", &P_FASTMAIL), - ("internetemails.net", &P_FASTMAIL), - ("internetmailing.net", &P_FASTMAIL), - ("jetemail.net", &P_FASTMAIL), - ("justemail.net", &P_FASTMAIL), - ("letterboxes.org", &P_FASTMAIL), - ("mail-central.com", &P_FASTMAIL), - ("mail-page.com", &P_FASTMAIL), - ("mailandftp.com", &P_FASTMAIL), - ("mailas.com", &P_FASTMAIL), - ("mailbolt.com", &P_FASTMAIL), - ("mailc.net", &P_FASTMAIL), - ("mailcan.com", &P_FASTMAIL), - ("mailforce.net", &P_FASTMAIL), - ("mailftp.com", &P_FASTMAIL), - ("mailhaven.com", &P_FASTMAIL), - ("mailingaddress.org", &P_FASTMAIL), - ("mailite.com", &P_FASTMAIL), - ("mailmight.com", &P_FASTMAIL), - ("mailnew.com", &P_FASTMAIL), - ("mailsent.net", &P_FASTMAIL), - ("mailservice.ms", &P_FASTMAIL), - ("mailup.net", &P_FASTMAIL), - ("mailworks.org", &P_FASTMAIL), - ("ml1.net", &P_FASTMAIL), - ("mm.st", &P_FASTMAIL), - ("myfastmail.com", &P_FASTMAIL), - ("mymacmail.com", &P_FASTMAIL), - ("nospammail.net", &P_FASTMAIL), - ("ownmail.net", &P_FASTMAIL), - ("petml.com", &P_FASTMAIL), - ("postinbox.com", &P_FASTMAIL), - ("postpro.net", &P_FASTMAIL), - ("proinbox.com", &P_FASTMAIL), - ("promessage.com", &P_FASTMAIL), - ("realemail.net", &P_FASTMAIL), - ("reallyfast.biz", &P_FASTMAIL), - ("reallyfast.info", &P_FASTMAIL), - ("rushpost.com", &P_FASTMAIL), - ("sent.as", &P_FASTMAIL), - ("sent.at", &P_FASTMAIL), - ("sent.com", &P_FASTMAIL), - ("speedpost.net", &P_FASTMAIL), - ("speedymail.org", &P_FASTMAIL), - ("ssl-mail.com", &P_FASTMAIL), - ("swift-mail.com", &P_FASTMAIL), - ("the-fastest.net", &P_FASTMAIL), - ("the-quickest.com", &P_FASTMAIL), - ("theinternetemail.com", &P_FASTMAIL), - ("veryfast.biz", &P_FASTMAIL), - ("veryspeedy.net", &P_FASTMAIL), - ("warpmail.net", &P_FASTMAIL), - ("xsmail.com", &P_FASTMAIL), - ("yepmail.net", &P_FASTMAIL), - ("your-mail.com", &P_FASTMAIL), - ("firemail.at", &P_FIREMAIL_DE), - ("firemail.de", &P_FIREMAIL_DE), - ("five.chat", &P_FIVE_CHAT), - ("freenet.de", &P_FREENET_DE), - ("gmail.com", &P_GMAIL), - ("googlemail.com", &P_GMAIL), - ("google.com", &P_GMAIL), - ("gmx.net", &P_GMX_NET), - ("gmx.de", &P_GMX_NET), - ("gmx.at", &P_GMX_NET), - ("gmx.ch", &P_GMX_NET), - ("gmx.org", &P_GMX_NET), - ("gmx.eu", &P_GMX_NET), - ("gmx.info", &P_GMX_NET), - ("gmx.biz", &P_GMX_NET), - ("gmx.com", &P_GMX_NET), - ("ac.hermes.radio", &P_HERMES_RADIO), - ("ac1.hermes.radio", &P_HERMES_RADIO), - ("ac2.hermes.radio", &P_HERMES_RADIO), - ("ac3.hermes.radio", &P_HERMES_RADIO), - ("ac4.hermes.radio", &P_HERMES_RADIO), - ("ac5.hermes.radio", &P_HERMES_RADIO), - ("ac6.hermes.radio", &P_HERMES_RADIO), - ("ac7.hermes.radio", &P_HERMES_RADIO), - ("ac8.hermes.radio", &P_HERMES_RADIO), - ("ac9.hermes.radio", &P_HERMES_RADIO), - ("ac10.hermes.radio", &P_HERMES_RADIO), - ("ac11.hermes.radio", &P_HERMES_RADIO), - ("ac12.hermes.radio", &P_HERMES_RADIO), - ("ac13.hermes.radio", &P_HERMES_RADIO), - ("ac14.hermes.radio", &P_HERMES_RADIO), - ("ac15.hermes.radio", &P_HERMES_RADIO), - ("ka.hermes.radio", &P_HERMES_RADIO), - ("ka1.hermes.radio", &P_HERMES_RADIO), - ("ka2.hermes.radio", &P_HERMES_RADIO), - ("ka3.hermes.radio", &P_HERMES_RADIO), - ("ka4.hermes.radio", &P_HERMES_RADIO), - ("ka5.hermes.radio", &P_HERMES_RADIO), - ("ka6.hermes.radio", &P_HERMES_RADIO), - ("ka7.hermes.radio", &P_HERMES_RADIO), - ("ka8.hermes.radio", &P_HERMES_RADIO), - ("ka9.hermes.radio", &P_HERMES_RADIO), - ("ka10.hermes.radio", &P_HERMES_RADIO), - ("ka11.hermes.radio", &P_HERMES_RADIO), - ("ka12.hermes.radio", &P_HERMES_RADIO), - ("ka13.hermes.radio", &P_HERMES_RADIO), - ("ka14.hermes.radio", &P_HERMES_RADIO), - ("ka15.hermes.radio", &P_HERMES_RADIO), - ("ec.hermes.radio", &P_HERMES_RADIO), - ("ec1.hermes.radio", &P_HERMES_RADIO), - ("ec2.hermes.radio", &P_HERMES_RADIO), - ("ec3.hermes.radio", &P_HERMES_RADIO), - ("ec4.hermes.radio", &P_HERMES_RADIO), - ("ec5.hermes.radio", &P_HERMES_RADIO), - ("ec6.hermes.radio", &P_HERMES_RADIO), - ("ec7.hermes.radio", &P_HERMES_RADIO), - ("ec8.hermes.radio", &P_HERMES_RADIO), - ("ec9.hermes.radio", &P_HERMES_RADIO), - ("ec10.hermes.radio", &P_HERMES_RADIO), - ("ec11.hermes.radio", &P_HERMES_RADIO), - ("ec12.hermes.radio", &P_HERMES_RADIO), - ("ec13.hermes.radio", &P_HERMES_RADIO), - ("ec14.hermes.radio", &P_HERMES_RADIO), - ("ec15.hermes.radio", &P_HERMES_RADIO), - ("hermes.radio", &P_HERMES_RADIO), - ("hey.com", &P_HEY_COM), - ("i.ua", &P_I_UA), - ("i3.net", &P_I3_NET), - ("icloud.com", &P_ICLOUD), - ("me.com", &P_ICLOUD), - ("mac.com", &P_ICLOUD), - ("ik.me", &P_INFOMANIAK_COM), - ("kolst.com", &P_KOLST_COM), - ("kontent.com", &P_KONTENT_COM), - ("mail.de", &P_MAIL_DE), - ("mail.ru", &P_MAIL_RU), - ("inbox.ru", &P_MAIL_RU), - ("internet.ru", &P_MAIL_RU), - ("bk.ru", &P_MAIL_RU), - ("list.ru", &P_MAIL_RU), - ("mail2tor.com", &P_MAIL2TOR), - ("mailbox.org", &P_MAILBOX_ORG), - ("secure.mailbox.org", &P_MAILBOX_ORG), - ("mailo.com", &P_MAILO_COM), - ("nauta.cu", &P_NAUTA_CU), - ("naver.com", &P_NAVER), - ("nine.testrun.org", &P_NINE_TESTRUN_ORG), - ("nubo.coop", &P_NUBO_COOP), - ("hotmail.com", &P_OUTLOOK_COM), - ("outlook.com", &P_OUTLOOK_COM), - ("office365.com", &P_OUTLOOK_COM), - ("outlook.com.tr", &P_OUTLOOK_COM), - ("live.com", &P_OUTLOOK_COM), - ("outlook.de", &P_OUTLOOK_COM), - ("ouvaton.org", &P_OUVATON_COOP), - ("posteo.de", &P_POSTEO), - ("posteo.af", &P_POSTEO), - ("posteo.at", &P_POSTEO), - ("posteo.be", &P_POSTEO), - ("posteo.ca", &P_POSTEO), - ("posteo.ch", &P_POSTEO), - ("posteo.cl", &P_POSTEO), - ("posteo.co", &P_POSTEO), - ("posteo.co.uk", &P_POSTEO), - ("posteo.com.br", &P_POSTEO), - ("posteo.cr", &P_POSTEO), - ("posteo.cz", &P_POSTEO), - ("posteo.dk", &P_POSTEO), - ("posteo.ee", &P_POSTEO), - ("posteo.es", &P_POSTEO), - ("posteo.eu", &P_POSTEO), - ("posteo.fi", &P_POSTEO), - ("posteo.gl", &P_POSTEO), - ("posteo.gr", &P_POSTEO), - ("posteo.hn", &P_POSTEO), - ("posteo.hr", &P_POSTEO), - ("posteo.hu", &P_POSTEO), - ("posteo.ie", &P_POSTEO), - ("posteo.in", &P_POSTEO), - ("posteo.is", &P_POSTEO), - ("posteo.it", &P_POSTEO), - ("posteo.jp", &P_POSTEO), - ("posteo.la", &P_POSTEO), - ("posteo.li", &P_POSTEO), - ("posteo.lt", &P_POSTEO), - ("posteo.lu", &P_POSTEO), - ("posteo.me", &P_POSTEO), - ("posteo.mx", &P_POSTEO), - ("posteo.my", &P_POSTEO), - ("posteo.net", &P_POSTEO), - ("posteo.nl", &P_POSTEO), - ("posteo.no", &P_POSTEO), - ("posteo.nz", &P_POSTEO), - ("posteo.org", &P_POSTEO), - ("posteo.pe", &P_POSTEO), - ("posteo.pl", &P_POSTEO), - ("posteo.pm", &P_POSTEO), - ("posteo.pt", &P_POSTEO), - ("posteo.ro", &P_POSTEO), - ("posteo.ru", &P_POSTEO), - ("posteo.se", &P_POSTEO), - ("posteo.sg", &P_POSTEO), - ("posteo.si", &P_POSTEO), - ("posteo.tn", &P_POSTEO), - ("posteo.uk", &P_POSTEO), - ("posteo.us", &P_POSTEO), - ("protonmail.com", &P_PROTONMAIL), - ("protonmail.ch", &P_PROTONMAIL), - ("pm.me", &P_PROTONMAIL), - ("qq.com", &P_QQ), - ("foxmail.com", &P_QQ), - ("riseup.net", &P_RISEUP_NET), - ("rogers.com", &P_ROGERS_COM), - ("sonic.net", &P_SONIC), - ("systemausfall.org", &P_SYSTEMAUSFALL_ORG), - ("solidaris.me", &P_SYSTEMAUSFALL_ORG), - ("systemli.org", &P_SYSTEMLI_ORG), - ("t-online.de", &P_T_ONLINE), - ("magenta.de", &P_T_ONLINE), - ("testrun.org", &P_TESTRUN), - ("tiscali.it", &P_TISCALI_IT), - ("tutanota.com", &P_TUTANOTA), - ("tutanota.de", &P_TUTANOTA), - ("tutamail.com", &P_TUTANOTA), - ("tuta.io", &P_TUTANOTA), - ("keemail.me", &P_TUTANOTA), - ("ukr.net", &P_UKR_NET), - ("undernet.uy", &P_UNDERNET_UY), - ("vfemail.net", &P_VFEMAIL), - ("vivaldi.net", &P_VIVALDI), - ("vodafone.de", &P_VODAFONE_DE), - ("vodafonemail.de", &P_VODAFONE_DE), - ("web.de", &P_WEB_DE), - ("email.de", &P_WEB_DE), - ("flirt.ms", &P_WEB_DE), - ("hallo.ms", &P_WEB_DE), - ("kuss.ms", &P_WEB_DE), - ("love.ms", &P_WEB_DE), - ("magic.ms", &P_WEB_DE), - ("singles.ms", &P_WEB_DE), - ("cool.ms", &P_WEB_DE), - ("kanzler.ms", &P_WEB_DE), - ("okay.ms", &P_WEB_DE), - ("party.ms", &P_WEB_DE), - ("pop.ms", &P_WEB_DE), - ("stars.ms", &P_WEB_DE), - ("techno.ms", &P_WEB_DE), - ("clever.ms", &P_WEB_DE), - ("deutschland.ms", &P_WEB_DE), - ("genial.ms", &P_WEB_DE), - ("ich.ms", &P_WEB_DE), - ("online.ms", &P_WEB_DE), - ("smart.ms", &P_WEB_DE), - ("wichtig.ms", &P_WEB_DE), - ("action.ms", &P_WEB_DE), - ("fussball.ms", &P_WEB_DE), - ("joker.ms", &P_WEB_DE), - ("planet.ms", &P_WEB_DE), - ("power.ms", &P_WEB_DE), - ("yahoo.com", &P_YAHOO), - ("yahoo.de", &P_YAHOO), - ("yahoo.it", &P_YAHOO), - ("yahoo.fr", &P_YAHOO), - ("yahoo.es", &P_YAHOO), - ("yahoo.se", &P_YAHOO), - ("yahoo.co.uk", &P_YAHOO), - ("yahoo.co.nz", &P_YAHOO), - ("yahoo.com.au", &P_YAHOO), - ("yahoo.com.ar", &P_YAHOO), - ("yahoo.com.br", &P_YAHOO), - ("yahoo.com.mx", &P_YAHOO), - ("ymail.com", &P_YAHOO), - ("rocketmail.com", &P_YAHOO), - ("yahoodns.net", &P_YAHOO), - ("yandex.com", &P_YANDEX_RU), - ("yandex.by", &P_YANDEX_RU), - ("yandex.kz", &P_YANDEX_RU), - ("yandex.ru", &P_YANDEX_RU), - ("yandex.ua", &P_YANDEX_RU), - ("ya.ru", &P_YANDEX_RU), - ("narod.ru", &P_YANDEX_RU), - ("yggmail", &P_YGGMAIL), - ("ziggo.nl", &P_ZIGGO_NL), - ("zohomail.eu", &P_ZOHO), - ("zohomail.com", &P_ZOHO), - ("zoho.com", &P_ZOHO), - ]) -}); +pub(crate) static PROVIDER_DATA: [(&str, &Provider); 318] = [ + ("163.com", &P_163), + ("aktivix.org", &P_AKTIVIX_ORG), + ("aol.com", &P_AOL), + ("arcor.de", &P_ARCOR_DE), + ("autistici.org", &P_AUTISTICI_ORG), + ("delta.blinzeln.de", &P_BLINDZELN_ORG), + ("delta.blindzeln.org", &P_BLINDZELN_ORG), + ("bluewin.ch", &P_BLUEWIN_CH), + ("buzon.uy", &P_BUZON_UY), + ("c1.testrun.org", &P_C1_TESTRUN_ORG), + ("c2.testrun.org", &P_C2_TESTRUN_ORG), + ("c3.testrun.org", &P_C3_TESTRUN_ORG), + ("chello.at", &P_CHELLO_AT), + ("xfinity.com", &P_COMCAST), + ("comcast.net", &P_COMCAST), + ("dismail.de", &P_DISMAIL_DE), + ("disroot.org", &P_DISROOT), + ("e.email", &P_E_EMAIL), + ("espiv.net", &P_ESPIV_NET), + ("example.com", &P_EXAMPLE_COM), + ("example.org", &P_EXAMPLE_COM), + ("example.net", &P_EXAMPLE_COM), + ("123mail.org", &P_FASTMAIL), + ("150mail.com", &P_FASTMAIL), + ("150ml.com", &P_FASTMAIL), + ("16mail.com", &P_FASTMAIL), + ("2-mail.com", &P_FASTMAIL), + ("4email.net", &P_FASTMAIL), + ("50mail.com", &P_FASTMAIL), + ("airpost.net", &P_FASTMAIL), + ("allmail.net", &P_FASTMAIL), + ("bestmail.us", &P_FASTMAIL), + ("cluemail.com", &P_FASTMAIL), + ("elitemail.org", &P_FASTMAIL), + ("emailcorner.net", &P_FASTMAIL), + ("emailengine.net", &P_FASTMAIL), + ("emailengine.org", &P_FASTMAIL), + ("emailgroups.net", &P_FASTMAIL), + ("emailplus.org", &P_FASTMAIL), + ("emailuser.net", &P_FASTMAIL), + ("eml.cc", &P_FASTMAIL), + ("f-m.fm", &P_FASTMAIL), + ("fast-email.com", &P_FASTMAIL), + ("fast-mail.org", &P_FASTMAIL), + ("fastem.com", &P_FASTMAIL), + ("fastemail.us", &P_FASTMAIL), + ("fastemailer.com", &P_FASTMAIL), + ("fastest.cc", &P_FASTMAIL), + ("fastimap.com", &P_FASTMAIL), + ("fastmail.cn", &P_FASTMAIL), + ("fastmail.co.uk", &P_FASTMAIL), + ("fastmail.com", &P_FASTMAIL), + ("fastmail.com.au", &P_FASTMAIL), + ("fastmail.de", &P_FASTMAIL), + ("fastmail.es", &P_FASTMAIL), + ("fastmail.fm", &P_FASTMAIL), + ("fastmail.fr", &P_FASTMAIL), + ("fastmail.im", &P_FASTMAIL), + ("fastmail.in", &P_FASTMAIL), + ("fastmail.jp", &P_FASTMAIL), + ("fastmail.mx", &P_FASTMAIL), + ("fastmail.net", &P_FASTMAIL), + ("fastmail.nl", &P_FASTMAIL), + ("fastmail.org", &P_FASTMAIL), + ("fastmail.se", &P_FASTMAIL), + ("fastmail.to", &P_FASTMAIL), + ("fastmail.tw", &P_FASTMAIL), + ("fastmail.uk", &P_FASTMAIL), + ("fastmail.us", &P_FASTMAIL), + ("fastmailbox.net", &P_FASTMAIL), + ("fastmessaging.com", &P_FASTMAIL), + ("fea.st", &P_FASTMAIL), + ("fmail.co.uk", &P_FASTMAIL), + ("fmailbox.com", &P_FASTMAIL), + ("fmgirl.com", &P_FASTMAIL), + ("fmguy.com", &P_FASTMAIL), + ("ftml.net", &P_FASTMAIL), + ("h-mail.us", &P_FASTMAIL), + ("hailmail.net", &P_FASTMAIL), + ("imap-mail.com", &P_FASTMAIL), + ("imap.cc", &P_FASTMAIL), + ("imapmail.org", &P_FASTMAIL), + ("inoutbox.com", &P_FASTMAIL), + ("internet-e-mail.com", &P_FASTMAIL), + ("internet-mail.org", &P_FASTMAIL), + ("internetemails.net", &P_FASTMAIL), + ("internetmailing.net", &P_FASTMAIL), + ("jetemail.net", &P_FASTMAIL), + ("justemail.net", &P_FASTMAIL), + ("letterboxes.org", &P_FASTMAIL), + ("mail-central.com", &P_FASTMAIL), + ("mail-page.com", &P_FASTMAIL), + ("mailandftp.com", &P_FASTMAIL), + ("mailas.com", &P_FASTMAIL), + ("mailbolt.com", &P_FASTMAIL), + ("mailc.net", &P_FASTMAIL), + ("mailcan.com", &P_FASTMAIL), + ("mailforce.net", &P_FASTMAIL), + ("mailftp.com", &P_FASTMAIL), + ("mailhaven.com", &P_FASTMAIL), + ("mailingaddress.org", &P_FASTMAIL), + ("mailite.com", &P_FASTMAIL), + ("mailmight.com", &P_FASTMAIL), + ("mailnew.com", &P_FASTMAIL), + ("mailsent.net", &P_FASTMAIL), + ("mailservice.ms", &P_FASTMAIL), + ("mailup.net", &P_FASTMAIL), + ("mailworks.org", &P_FASTMAIL), + ("ml1.net", &P_FASTMAIL), + ("mm.st", &P_FASTMAIL), + ("myfastmail.com", &P_FASTMAIL), + ("mymacmail.com", &P_FASTMAIL), + ("nospammail.net", &P_FASTMAIL), + ("ownmail.net", &P_FASTMAIL), + ("petml.com", &P_FASTMAIL), + ("postinbox.com", &P_FASTMAIL), + ("postpro.net", &P_FASTMAIL), + ("proinbox.com", &P_FASTMAIL), + ("promessage.com", &P_FASTMAIL), + ("realemail.net", &P_FASTMAIL), + ("reallyfast.biz", &P_FASTMAIL), + ("reallyfast.info", &P_FASTMAIL), + ("rushpost.com", &P_FASTMAIL), + ("sent.as", &P_FASTMAIL), + ("sent.at", &P_FASTMAIL), + ("sent.com", &P_FASTMAIL), + ("speedpost.net", &P_FASTMAIL), + ("speedymail.org", &P_FASTMAIL), + ("ssl-mail.com", &P_FASTMAIL), + ("swift-mail.com", &P_FASTMAIL), + ("the-fastest.net", &P_FASTMAIL), + ("the-quickest.com", &P_FASTMAIL), + ("theinternetemail.com", &P_FASTMAIL), + ("veryfast.biz", &P_FASTMAIL), + ("veryspeedy.net", &P_FASTMAIL), + ("warpmail.net", &P_FASTMAIL), + ("xsmail.com", &P_FASTMAIL), + ("yepmail.net", &P_FASTMAIL), + ("your-mail.com", &P_FASTMAIL), + ("firemail.at", &P_FIREMAIL_DE), + ("firemail.de", &P_FIREMAIL_DE), + ("five.chat", &P_FIVE_CHAT), + ("freenet.de", &P_FREENET_DE), + ("gmail.com", &P_GMAIL), + ("googlemail.com", &P_GMAIL), + ("google.com", &P_GMAIL), + ("gmx.net", &P_GMX_NET), + ("gmx.de", &P_GMX_NET), + ("gmx.at", &P_GMX_NET), + ("gmx.ch", &P_GMX_NET), + ("gmx.org", &P_GMX_NET), + ("gmx.eu", &P_GMX_NET), + ("gmx.info", &P_GMX_NET), + ("gmx.biz", &P_GMX_NET), + ("gmx.com", &P_GMX_NET), + ("*.hermes.radio", &P_HERMES_RADIO), + ("*.aco-connexion.org", &P_HERMES_RADIO), + ("hey.com", &P_HEY_COM), + ("i.ua", &P_I_UA), + ("i3.net", &P_I3_NET), + ("icloud.com", &P_ICLOUD), + ("me.com", &P_ICLOUD), + ("mac.com", &P_ICLOUD), + ("ik.me", &P_INFOMANIAK_COM), + ("kolst.com", &P_KOLST_COM), + ("kontent.com", &P_KONTENT_COM), + ("mail.de", &P_MAIL_DE), + ("mail.ru", &P_MAIL_RU), + ("inbox.ru", &P_MAIL_RU), + ("internet.ru", &P_MAIL_RU), + ("bk.ru", &P_MAIL_RU), + ("list.ru", &P_MAIL_RU), + ("mail2tor.com", &P_MAIL2TOR), + ("mailbox.org", &P_MAILBOX_ORG), + ("secure.mailbox.org", &P_MAILBOX_ORG), + ("mailo.com", &P_MAILO_COM), + ("nauta.cu", &P_NAUTA_CU), + ("naver.com", &P_NAVER), + ("nine.testrun.org", &P_NINE_TESTRUN_ORG), + ("nubo.coop", &P_NUBO_COOP), + ("hotmail.com", &P_OUTLOOK_COM), + ("outlook.com", &P_OUTLOOK_COM), + ("office365.com", &P_OUTLOOK_COM), + ("outlook.com.tr", &P_OUTLOOK_COM), + ("live.com", &P_OUTLOOK_COM), + ("outlook.de", &P_OUTLOOK_COM), + ("ouvaton.org", &P_OUVATON_COOP), + ("posteo.de", &P_POSTEO), + ("posteo.af", &P_POSTEO), + ("posteo.at", &P_POSTEO), + ("posteo.be", &P_POSTEO), + ("posteo.ca", &P_POSTEO), + ("posteo.ch", &P_POSTEO), + ("posteo.cl", &P_POSTEO), + ("posteo.co", &P_POSTEO), + ("posteo.co.uk", &P_POSTEO), + ("posteo.com.br", &P_POSTEO), + ("posteo.cr", &P_POSTEO), + ("posteo.cz", &P_POSTEO), + ("posteo.dk", &P_POSTEO), + ("posteo.ee", &P_POSTEO), + ("posteo.es", &P_POSTEO), + ("posteo.eu", &P_POSTEO), + ("posteo.fi", &P_POSTEO), + ("posteo.gl", &P_POSTEO), + ("posteo.gr", &P_POSTEO), + ("posteo.hn", &P_POSTEO), + ("posteo.hr", &P_POSTEO), + ("posteo.hu", &P_POSTEO), + ("posteo.ie", &P_POSTEO), + ("posteo.in", &P_POSTEO), + ("posteo.is", &P_POSTEO), + ("posteo.it", &P_POSTEO), + ("posteo.jp", &P_POSTEO), + ("posteo.la", &P_POSTEO), + ("posteo.li", &P_POSTEO), + ("posteo.lt", &P_POSTEO), + ("posteo.lu", &P_POSTEO), + ("posteo.me", &P_POSTEO), + ("posteo.mx", &P_POSTEO), + ("posteo.my", &P_POSTEO), + ("posteo.net", &P_POSTEO), + ("posteo.nl", &P_POSTEO), + ("posteo.no", &P_POSTEO), + ("posteo.nz", &P_POSTEO), + ("posteo.org", &P_POSTEO), + ("posteo.pe", &P_POSTEO), + ("posteo.pl", &P_POSTEO), + ("posteo.pm", &P_POSTEO), + ("posteo.pt", &P_POSTEO), + ("posteo.ro", &P_POSTEO), + ("posteo.ru", &P_POSTEO), + ("posteo.se", &P_POSTEO), + ("posteo.sg", &P_POSTEO), + ("posteo.si", &P_POSTEO), + ("posteo.tn", &P_POSTEO), + ("posteo.uk", &P_POSTEO), + ("posteo.us", &P_POSTEO), + ("protonmail.com", &P_PROTONMAIL), + ("protonmail.ch", &P_PROTONMAIL), + ("pm.me", &P_PROTONMAIL), + ("qq.com", &P_QQ), + ("foxmail.com", &P_QQ), + ("riseup.net", &P_RISEUP_NET), + ("rogers.com", &P_ROGERS_COM), + ("sonic.net", &P_SONIC), + ("systemausfall.org", &P_SYSTEMAUSFALL_ORG), + ("solidaris.me", &P_SYSTEMAUSFALL_ORG), + ("systemli.org", &P_SYSTEMLI_ORG), + ("t-online.de", &P_T_ONLINE), + ("magenta.de", &P_T_ONLINE), + ("testrun.org", &P_TESTRUN), + ("tiscali.it", &P_TISCALI_IT), + ("tutanota.com", &P_TUTANOTA), + ("tutanota.de", &P_TUTANOTA), + ("tutamail.com", &P_TUTANOTA), + ("tuta.io", &P_TUTANOTA), + ("keemail.me", &P_TUTANOTA), + ("ukr.net", &P_UKR_NET), + ("undernet.uy", &P_UNDERNET_UY), + ("vfemail.net", &P_VFEMAIL), + ("vivaldi.net", &P_VIVALDI), + ("vodafone.de", &P_VODAFONE_DE), + ("vodafonemail.de", &P_VODAFONE_DE), + ("web.de", &P_WEB_DE), + ("email.de", &P_WEB_DE), + ("flirt.ms", &P_WEB_DE), + ("hallo.ms", &P_WEB_DE), + ("kuss.ms", &P_WEB_DE), + ("love.ms", &P_WEB_DE), + ("magic.ms", &P_WEB_DE), + ("singles.ms", &P_WEB_DE), + ("cool.ms", &P_WEB_DE), + ("kanzler.ms", &P_WEB_DE), + ("okay.ms", &P_WEB_DE), + ("party.ms", &P_WEB_DE), + ("pop.ms", &P_WEB_DE), + ("stars.ms", &P_WEB_DE), + ("techno.ms", &P_WEB_DE), + ("clever.ms", &P_WEB_DE), + ("deutschland.ms", &P_WEB_DE), + ("genial.ms", &P_WEB_DE), + ("ich.ms", &P_WEB_DE), + ("online.ms", &P_WEB_DE), + ("smart.ms", &P_WEB_DE), + ("wichtig.ms", &P_WEB_DE), + ("action.ms", &P_WEB_DE), + ("fussball.ms", &P_WEB_DE), + ("joker.ms", &P_WEB_DE), + ("planet.ms", &P_WEB_DE), + ("power.ms", &P_WEB_DE), + ("yahoo.com", &P_YAHOO), + ("yahoo.de", &P_YAHOO), + ("yahoo.it", &P_YAHOO), + ("yahoo.fr", &P_YAHOO), + ("yahoo.es", &P_YAHOO), + ("yahoo.se", &P_YAHOO), + ("yahoo.co.uk", &P_YAHOO), + ("yahoo.co.nz", &P_YAHOO), + ("yahoo.com.au", &P_YAHOO), + ("yahoo.com.ar", &P_YAHOO), + ("yahoo.com.br", &P_YAHOO), + ("yahoo.com.mx", &P_YAHOO), + ("ymail.com", &P_YAHOO), + ("rocketmail.com", &P_YAHOO), + ("yahoodns.net", &P_YAHOO), + ("yandex.com", &P_YANDEX_RU), + ("yandex.by", &P_YANDEX_RU), + ("yandex.kz", &P_YANDEX_RU), + ("yandex.ru", &P_YANDEX_RU), + ("yandex.ua", &P_YANDEX_RU), + ("ya.ru", &P_YANDEX_RU), + ("narod.ru", &P_YANDEX_RU), + ("yggmail", &P_YGGMAIL), + ("ziggo.nl", &P_ZIGGO_NL), + ("zohomail.eu", &P_ZOHO), + ("zohomail.com", &P_ZOHO), + ("zoho.com", &P_ZOHO), +]; pub(crate) static PROVIDER_IDS: Lazy> = Lazy::new(|| { HashMap::from([ @@ -2050,4 +2001,4 @@ pub(crate) static PROVIDER_IDS: Lazy> = }); pub static _PROVIDER_UPDATED: Lazy = - Lazy::new(|| chrono::NaiveDate::from_ymd_opt(2023, 11, 5).unwrap()); + Lazy::new(|| chrono::NaiveDate::from_ymd_opt(2024, 2, 5).unwrap());