]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Feature] Add ESMTPSA received type
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 15 Jun 2016 16:42:56 +0000 (17:42 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 15 Jun 2016 16:42:56 +0000 (17:42 +0100)
src/libmime/message.h
src/lua/lua_task.c
src/ragel/smtp_received.rl
src/ragel/smtp_received_parser.rl

index cacb4287b696d8616442a88cb70a38432aec8b9b..619154c6b8a5e2f0b6d3c0b2f3326a2e31bfd7f8 100644 (file)
@@ -61,6 +61,7 @@ enum rspamd_received_type {
        RSPAMD_RECEIVED_ESMTP,
        RSPAMD_RECEIVED_ESMTPA,
        RSPAMD_RECEIVED_ESMTPS,
+       RSPAMD_RECEIVED_ESMTPSA,
        RSPAMD_RECEIVED_LMTP,
        RSPAMD_RECEIVED_IMAP,
        RSPAMD_RECEIVED_UNKNOWN
index 38402039b2526b8284204e2e258e4b39f3f0cb0f..15b0ae0b71071a1010a559c486a43cbad9ff57be 100644 (file)
@@ -1439,7 +1439,7 @@ lua_task_get_received_headers (lua_State * L)
                        if (G_UNLIKELY (rh->from_ip == NULL &&
                                        rh->real_ip == NULL &&
                                        rh->real_hostname == NULL &&
-                                       rh->by_hostname == NULL)) {
+                                       rh->by_hostname == NULL && rh->timestamp == 0)) {
                                continue;
                        }
 
@@ -1465,6 +1465,9 @@ lua_task_get_received_headers (lua_State * L)
                        case RSPAMD_RECEIVED_ESMTPA:
                                proto = "esmtpa";
                                break;
+                       case RSPAMD_RECEIVED_ESMTPSA:
+                               proto = "esmtpsa";
+                               break;
                        case RSPAMD_RECEIVED_LMTP:
                                proto = "lmtp";
                                break;
index dd2212de3663122bd32e1efefa2465f48f2fcb11..e005dcc9ca3621c26d31452a4f5c70ed816b5275 100644 (file)
@@ -15,6 +15,7 @@
                    "SMTP" %SMTP_proto |
                    "ESMTPS" %ESMTPS_proto |
                    "ESMTPA" %ESMTPA_proto |
+                   "ESMTPSA" %ESMTPSA_proto |
                    "LMTP" %LMTP_proto |
                    "IMAP" %IMAP_proto |
                    Attdl_Protocol;
index bfd32eaaa576073c5f1868b149d02122a1011b8d..b2c73cab3d840069be3bde0e7e5ecd580e3dfb1f 100644 (file)
   action ESMTP_proto {
     rh->type = RSPAMD_RECEIVED_ESMTP;
   }
+  action ESMTPSA_proto {
+    rh->type = RSPAMD_RECEIVED_ESMTPSA;
+  }
   action LMTP_proto {
     rh->type = RSPAMD_RECEIVED_LMTP;
   }