Skip to content

Commit 9984cad

Browse files
committed
Expand email alias domain lists
Add fastmail.ca to the Fastmail domain set and myyahoo.com to the Yahoo domain set, so more equivalent addresses normalize to the same value before hashing. Both are confirmed to run on their provider's own mail platform with no third-party migration history.
1 parent 7c95bd0 commit 9984cad

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

src/MinFraud/Util.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ class Util
127127
'fastemailer.com' => true,
128128
'fastest.cc' => true,
129129
'fastimap.com' => true,
130+
'fastmail.ca' => true,
130131
'fastmail.cn' => true,
131132
'fastmail.co.uk' => true,
132133
'fastmail.com' => true,
@@ -223,6 +224,7 @@ class Util
223224
* @var array<string, bool>
224225
*/
225226
private static $yahooDomains = [
227+
'myyahoo.com' => true,
226228
'y7mail.com' => true,
227229
'yahoo.at' => true,
228230
'yahoo.be' => true,

tests/MaxMind/Test/MinFraud/UtilTest.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,16 @@ public function testMaybeHashEmail(): void
188188
],
189189
],
190190
],
191+
[
192+
'name' => 'Fastmail Canada alias domain',
193+
'input' => ['email' => ['address' => 'alias@user.fastmail.ca']],
194+
'expected' => [
195+
'email' => [
196+
'address' => md5('user@fastmail.ca'),
197+
'domain' => 'user.fastmail.ca',
198+
],
199+
],
200+
],
191201
[
192202
'name' => 'Domain with multiple host parts',
193203
'input' => ['email' => ['address' => 'foo@bar.example.com']],
@@ -208,6 +218,16 @@ public function testMaybeHashEmail(): void
208218
],
209219
],
210220
],
221+
[
222+
'name' => 'Alternate Yahoo signup domain',
223+
'input' => ['email' => ['address' => 'test-alias@myyahoo.com']],
224+
'expected' => [
225+
'email' => [
226+
'address' => md5('test@myyahoo.com'),
227+
'domain' => 'myyahoo.com',
228+
],
229+
],
230+
],
211231
[
212232
'name' => '.com.com',
213233
'input' => ['email' => ['address' => 'foo@example.com.com']],

0 commit comments

Comments
 (0)