aboutsummaryrefslogtreecommitdiffstats
path: root/src/protocol.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-03-10 19:54:20 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-03-10 19:54:20 +0300
commite7017a518bbec3f2de37275ac6195ea55cb6b19e (patch)
tree084f1c81a1d0606e575abd2156e5c4314615652c /src/protocol.c
parent9cfc5813c0a07ddce2bd0c611a9de84f67a4a910 (diff)
downloadrspamd-e7017a518bbec3f2de37275ac6195ea55cb6b19e.tar.gz
rspamd-e7017a518bbec3f2de37275ac6195ea55cb6b19e.zip
* Fix redirector connection procedure
* Add more strict login * Add new header Queue-ID to protocol * Log message id or queue id * Add config file for redirector * Add ability to set regexp and domains list to check with redirector
Diffstat (limited to 'src/protocol.c')
-rw-r--r--src/protocol.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/protocol.c b/src/protocol.c
index 598c851c6..257426813 100644
--- a/src/protocol.c
+++ b/src/protocol.c
@@ -77,6 +77,7 @@
#define IP_ADDR_HEADER "IP"
#define NRCPT_HEADER "Recipient-Number"
#define RCPT_HEADER "Rcpt"
+#define QUEUE_ID_HEADER "Queue-ID"
#define ERROR_HEADER "Error"
/*
* Reply messages
@@ -247,6 +248,18 @@ parse_header (struct worker_task *task, char *line)
return -1;
}
break;
+ case 'q':
+ case 'Q':
+ /* Queue id */
+ if (strncasecmp (headern, QUEUE_ID_HEADER, sizeof (QUEUE_ID_HEADER) - 1) == 0) {
+ task->queue_id = memory_pool_strdup (task->task_pool, line);
+ msg_debug ("parse_header: read queue_id header, value: %s", task->queue_id);
+ }
+ else {
+ msg_info ("parse_header: wrong header: %s", headern);
+ return -1;
+ }
+ break;
case 'r':
case 'R':
/* rcpt */