Skip to content

Commit

Permalink
[submodule:extensions] Add new email: Airmail, BlueMail, eMClient, Na…
Browse files Browse the repository at this point in the history
…verMailApp, Sparrow, Yahoo
  • Loading branch information
faisalman committed Nov 16, 2024
1 parent 14caf6d commit 2181559
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/extensions/ua-parser-extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ const Crawlers = Object.freeze({
[
// AhrefsBot - https://ahrefs.com/robot
// Amazonbot - https://developer.amazon.com/amazonbot
// Applebot - http://apple.com/go/applebot
// Bingbot - http://www.bing.com/bingbot.htm
// CCBot - https://commoncrawl.org/faq
// Dotbot - https://moz.com/help/moz-procedures/crawlers/dotbot
Expand All @@ -54,7 +53,10 @@ const Crawlers = Object.freeze({
// OpenAI's SearchGPT - https://platform.openai.com/docs/bots
// PerplexityBot - https://perplexity.ai/perplexitybot
// SemrushBot - http://www.semrush.com/bot.html
/((?:ahrefs|amazon|apple|bing|cc|dot|duckduck|exa|facebook|gpt|mj12|mojeek|oai-search|perplexity|semrush)bot)\/([\w\.]+)/i,
/((?:ahrefs|amazon|bing|cc|dot|duckduck|exa|facebook|gpt|mj12|mojeek|oai-search|perplexity|semrush)bot)\/([\w\.]+)/i,

// Applebot - http://apple.com/go/applebot
/(applebot(?:-extended)?)\/([\w\.]+)/i,

// Baiduspider https://help.baidu.com/question?prod_id=99&class=0&id=3001
/(baiduspider)[-imagevdonsfcpr]{0,6}\/([\w\.]+)/i,
Expand Down Expand Up @@ -195,8 +197,10 @@ const ExtraDevices = Object.freeze({

const Emails = Object.freeze({
browser : [
[
// Evolution / Kontact/KMail / [Microsoft/Mac] Outlook / Thunderbird
[/(evolution|kmail2?|kontact|(?:microsoft |mac)outlook|thunderbird)[\s\/]([\w\.]+)/i], [NAME, VERSION, [TYPE, EMAIL]]
/(airmail|bluemail|emclient|evolution|foxmail|kmail2?|kontact|(?:microsoft |mac)?outlook(?:-express)?|navermailapp|(?!chrom.+)sparrow|thunderbird|yahoo)(?:m.+ail; |[\/ ])([\w\.]+)/i
], [NAME, VERSION, [TYPE, EMAIL]]
]
});

Expand Down
90 changes: 90 additions & 0 deletions test/specs/browser-emails.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,34 @@
[
{
"desc" : "Airmail",
"ua" : "Airmail 1.0 rv:148 (Macintosh; Mac OS X 10.8.3; en_BE)",
"expect" :
{
"name" : "Airmail",
"version" : "1.0",
"type" : "email"
}
},
{
"desc" : "BlueMail",
"ua" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) BlueMail/0.10.31 Chrome/61.0.3163.100 Electron/2.0.18 Safari/537.36",
"expect" :
{
"name" : "BlueMail",
"version" : "0.10.31",
"type" : "email"
}
},
{
"desc" : "BlueMail",
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 12_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16A405 BlueMail iOS",
"expect" :
{
"name" : "BlueMail",
"version" : "iOS",
"type" : "email"
}
},
{
"desc" : "Evolution",
"ua" : "Evolution/3.52.3",
Expand All @@ -9,6 +39,26 @@
"type" : "email"
}
},
{
"desc" : "eM Client",
"ua" : "eMClient/9.2.2157.0",
"expect" :
{
"name" : "eMClient",
"version" : "9.2.2157.0",
"type" : "email"
}
},
{
"desc" : "Foxmail",
"ua" : "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36 foxmail/7.2.15.80",
"expect" :
{
"name" : "foxmail",
"version" : "7.2.15.80",
"type" : "email"
}
},
{
"desc" : "KMail",
"ua" : "KMail/4.14.10 (FreeBSD/12.0-CURRENT; KDE/4.14.10; amd64; ; )",
Expand Down Expand Up @@ -59,6 +109,26 @@
"type" : "email"
}
},
{
"desc" : "NaverMailApp",
"ua" : "NaverMailApp/2.1.23 (Android 10; SM-N960N)",
"expect" :
{
"name" : "NaverMailApp",
"version" : "2.1.23",
"type" : "email"
}
},
{
"desc" : "Sparrow",
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/604.5.6 (KHTML, like Gecko) Sparrow/1043.1",
"expect" :
{
"name" : "Sparrow",
"version" : "1043.1",
"type" : "email"
}
},
{
"desc" : "Thunderbird",
"ua" : "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0",
Expand All @@ -68,5 +138,25 @@
"version" : "78.13.0",
"type" : "email"
}
},
{
"desc" : "Yahoo! Mail",
"ua" : "YahooMobile/1.0 (mail; 3.0.5.1311380); (Linux; U; Android 4.0.3; htc_runnymede Build/ICE_CREAM_SANDWICH_MR1);",
"expect" :
{
"name" : "Yahoo",
"version" : "3.0.5.1311380",
"type" : "email"
}
},
{
"desc" : "Yahoo! Mail",
"ua" : "YahooMobileMail/1.0 (Android Mail; 1.3.10) (supersonic;HTC;PC36100;2.3.5/GRJ90) ",
"expect" :
{
"name" : "Yahoo",
"version" : "1.3.10",
"type" : "email"
}
}
]

0 comments on commit 2181559

Please sign in to comment.