]> source.dussan.org Git - rspamd.git/commitdiff
[Feature] Add more non-conformant Received headers support
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 3 Jul 2018 12:00:42 +0000 (13:00 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 3 Jul 2018 12:00:42 +0000 (13:00 +0100)
Received: from xx (1.1.2.2) by
        YYY.COM (xx:xx:xx:xx) with
        Microsoft SMTP Server (version=TLS1_2,
        cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 1.2.5.1; Wed, 7
        Mar 2018 23:13:02 +0000

src/ragel/smtp_address.rl
src/ragel/smtp_received.rl

index 4ea64eddfdbcf0b751e28d30debb7e5996d97923..f5d04f620730706575ddd197020b3e65e869d91f 100644 (file)
@@ -14,6 +14,7 @@
   address_literal  = "[" ( IPv4_address_literal |
                     IPv6_address_literal |
                     General_address_literal ) >Domain_addr_start %Domain_addr_end "]";
+  non_conformant_address_literal = IPv4_address_literal >Domain_addr_start %Domain_addr_end;
 
 
   sub_domain     = Let_dig Ldh_str?;
index 12aaeb08cec743a5acb76d604e7b8ac42f57a6f8..b13259fed8c88b818f45cd646f9b89df312d7022 100644 (file)
@@ -17,7 +17,8 @@
                    Attdl_Protocol;
 
   TCP_info       = address_literal >Real_IP_Start %Real_IP_End |
-                  ( Domain >Real_Domain_Start %Real_Domain_End FWS address_literal >Real_IP_Start %Real_IP_End );
+                  ( Domain >Real_Domain_Start %Real_Domain_End FWS address_literal >Real_IP_Start %Real_IP_End ) |
+                  ( non_conformant_address_literal >Real_IP_Start %Real_IP_End );
   Extended_Domain  = Domain >Real_Domain_Start %Real_Domain_End | # Used to be a real domain
                   ( Domain >Reported_Domain_Start %Reported_Domain_End FWS "(" TCP_info ")" ) | # Here domain is something specified by remote side
                   ( address_literal >Real_Domain_Start %Real_Domain_End FWS "(" TCP_info ")" ) |