diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-02-17 18:31:09 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-02-17 18:31:09 +0300 |
commit | 8227c09f9486642cd2792e760fe4659e25e05876 (patch) | |
tree | 8c4b27b76d27ae24830d3692314a0ec01171bb04 /src | |
parent | 7f54e7ec7e7fb50b856a31cb32b8f5b2b210e6ef (diff) | |
download | rspamd-8227c09f9486642cd2792e760fe4659e25e05876.tar.gz rspamd-8227c09f9486642cd2792e760fe4659e25e05876.zip |
Fix received headers parser state machine to parse headers with only 'by' component.
Diffstat (limited to 'src')
-rw-r--r-- | src/lua/lua_task.c | 5 | ||||
-rw-r--r-- | src/message.c | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index 8b02ac5e7..11485aa3e 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -324,10 +324,11 @@ lua_task_get_received_headers (lua_State * L) cur = g_list_first (task->received); while (cur) { rh = cur->data; - if (rh->is_error || ( + if (rh->is_error || G_UNLIKELY( rh->from_ip == NULL && rh->real_ip == NULL && - rh->real_hostname == NULL)) { + rh->real_hostname == NULL && + rh->by_hostname == NULL)) { cur = g_list_next (cur); continue; } diff --git a/src/message.c b/src/message.c index 323dd33a0..553ecca51 100644 --- a/src/message.c +++ b/src/message.c @@ -309,6 +309,9 @@ parse_recv_header (memory_pool_t * pool, gchar *line, struct received_header *r) next_state = 1; } } + else if (g_ascii_tolower (*p) == 'b' && g_ascii_tolower (*(p + 1)) == 'y') { + state = 3; + } else { /* This can be qmail header, parse it separately */ parse_qmail_recv (pool, line, r); |