@@ -549,6 +549,48 @@ def test_ported_string(self):
549549 s = ported_string (raw_data )
550550 self .assertEqual (s , "test" )
551551
552+ def test_parse_domain_with_tld_dot_id (self ):
553+ """Support for .id tld (Indonesia)"""
554+ received = """
555+ from web.myhost.id
556+ by smtp.domain.id (Proxmox) with ESMTPS id SOMEIDHERE
557+ for <email@example.id>; Wed, 19 Feb 2025 15:00:00 +0700 (WIB)
558+ """ .strip ()
559+
560+ expected = {
561+ "from" : "web.myhost.id" ,
562+ "by" : "smtp.domain.id (Proxmox)" ,
563+ "with" : "ESMTPS" ,
564+ "id" : "SOMEIDHERE" ,
565+ "for" : "<email@example.id>" ,
566+ "date" : "Wed, 19 Feb 2025 15:00:00 +0700 (WIB)" ,
567+ }
568+
569+ values_by_clause = parse_received (received )
570+
571+ self .assertEqual (expected , values_by_clause )
572+
573+ def test_parse_domain_with_tld_dot_by (self ):
574+ """Support for .by tld (Belarus)"""
575+ received = """
576+ from web.myhost.by
577+ by smtp.domain.by (Proxmox) with ESMTPS id SOMEIDHERE
578+ for <email@example.by>; Wed, 19 Feb 2025 15:00:00 +0700 (WIB)
579+ """ .strip ()
580+
581+ expected = {
582+ "from" : "web.myhost.by" ,
583+ "by" : "smtp.domain.by (Proxmox)" ,
584+ "with" : "ESMTPS" ,
585+ "id" : "SOMEIDHERE" ,
586+ "for" : "<email@example.by>" ,
587+ "date" : "Wed, 19 Feb 2025 15:00:00 +0700 (WIB)" ,
588+ }
589+
590+ values_by_clause = parse_received (received )
591+
592+ self .assertEqual (expected , values_by_clause )
593+
552594 def test_standard_outlook (self ):
553595 """Verify a basic outlook received header works."""
554596 received = """
0 commit comments