From: Vsevolod Stakhov Date: Fri, 25 Nov 2016 15:27:22 +0000 (+0000) Subject: [Fix] Relax requirements for Received as gmail cannot RFC X-Git-Tag: 1.4.1~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8eacee21da2b2a78759fc03d90f609c1136d1835;p=thirdparty%2Frspamd.git [Fix] Relax requirements for Received as gmail cannot RFC --- diff --git a/src/ragel/smtp_received.rl b/src/ragel/smtp_received.rl index c1fd467037..8b88d4ffe3 100644 --- a/src/ragel/smtp_received.rl +++ b/src/ragel/smtp_received.rl @@ -42,7 +42,7 @@ no_fold_literal = "[" dtext* "]"; id_right = dot_atom_text | no_fold_literal; msg_id = "<" id_left "@" id_right ">"; - ID = CFWS "ID"i FWS ( Atom | msg_id ); + ID = CFWS "ID"i FWS ( Dot_string | msg_id ); For = CFWS "FOR"i FWS ( Path | Mailbox ) >For_Start %For_End; Additional_Registered_Clauses = CFWS Atom FWS String; diff --git a/utils/received_parser_bench.c b/utils/received_parser_bench.c index cb304b6318..41a6374224 100644 --- a/utils/received_parser_bench.c +++ b/utils/received_parser_bench.c @@ -26,6 +26,7 @@ static gint total_real_ip = 0; static gint total_real_host = 0; static gint total_known_proto = 0; static gint total_known_ts = 0; +static gint total_known_for = 0; static void rspamd_process_file (const gchar *fname) @@ -82,6 +83,10 @@ rspamd_process_file (const gchar *fname) if (rh.timestamp != 0) { total_known_ts ++; } + + if (rh.for_mbox) { + total_known_for ++; + } } if (err) { @@ -111,11 +116,13 @@ main (int argc, char **argv) "Total real ip: %d\n" "Total real host: %d\n" "Total known proto: %d\n" - "Total known timestamp: %d\n", + "Total known timestamp: %d\n" + "Total known for: %d\n", total_parsed, total_time, total_valid, total_real_ip, total_real_host, total_known_proto, - total_known_ts); + total_known_ts, + total_known_for); return 0; }