diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-06-18 16:40:47 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-06-18 16:40:47 +0400 |
commit | e4977d9bfe416a230c4b74ecbeab3681a87db404 (patch) | |
tree | 0c80243ea96bf925a6d6a2d2d52ca431c82fdd02 /src/smtp.c | |
parent | fee46c0b872c559d451a7b4be486febda6ca7388 (diff) | |
download | rspamd-e4977d9bfe416a230c4b74ecbeab3681a87db404.tar.gz rspamd-e4977d9bfe416a230c4b74ecbeab3681a87db404.zip |
* Get weights of symbol from default metric for symbols cache
* Fix setting task->from/task->rctp in smtp client
Diffstat (limited to 'src/smtp.c')
-rw-r--r-- | src/smtp.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/smtp.c b/src/smtp.c index 97cb53b1e..a77c24467 100644 --- a/src/smtp.c +++ b/src/smtp.c @@ -317,6 +317,7 @@ process_smtp_data (struct smtp_session *session) { struct stat st; int r; + GList *cur, *t; if (fstat (session->temp_fd, &st) == -1) { goto err; @@ -342,6 +343,21 @@ process_smtp_data (struct smtp_session *session) goto err; } session->task->helo = session->helo; + /* Save MAIL FROM */ + cur = session->from; + if (cur && (cur = g_list_next (cur))) { + session->task->from = cur->data; + } + /* Save recipients */ + t = session->rcpt; + while (t) { + cur = t->data; + if (cur && (cur = g_list_next (cur))) { + session->task->rcpt = g_list_prepend (session->task->rcpt, cur->data); + } + t = g_list_next (t); + } + memcpy (&session->task->from_addr, &session->client_addr, sizeof (struct in_addr)); session->task->cmd = CMD_CHECK; r = process_filters (session->task); |