From: Vsevolod Stakhov Date: Tue, 3 Jul 2018 12:00:42 +0000 (+0100) Subject: [Feature] Add more non-conformant Received headers support X-Git-Tag: 1.7.8~51 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=28005bfdd441e313132b31f64497a86d0e27da62;p=thirdparty%2Frspamd.git [Feature] Add more non-conformant Received headers support 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 --- diff --git a/src/ragel/smtp_address.rl b/src/ragel/smtp_address.rl index 4ea64eddfd..f5d04f6207 100644 --- a/src/ragel/smtp_address.rl +++ b/src/ragel/smtp_address.rl @@ -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?; diff --git a/src/ragel/smtp_received.rl b/src/ragel/smtp_received.rl index 12aaeb08ce..b13259fed8 100644 --- a/src/ragel/smtp_received.rl +++ b/src/ragel/smtp_received.rl @@ -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 ")" ) |