]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Relax requirements for Received as gmail cannot RFC
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 25 Nov 2016 15:27:22 +0000 (15:27 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 25 Nov 2016 15:27:22 +0000 (15:27 +0000)
src/ragel/smtp_received.rl
utils/received_parser_bench.c

index c1fd46703753a7fab3ffae59624d02f366c9aea2..8b88d4ffe372cb10d5a307fd9d3e0b0fa5864f21 100644 (file)
@@ -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;
index cb304b631874923d0e43799301b96b19ba157894..41a63742241c786653a73b8512ca7f976b6ac2e5 100644 (file)
@@ -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;
 }