]> source.dussan.org Git - rspamd.git/commitdiff
Fix recipients_distance function.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 18 Aug 2014 13:57:05 +0000 (14:57 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 18 Aug 2014 13:57:05 +0000 (14:57 +0100)
src/expressions.c

index f63ec2d749f29ff397b94487643e0615a32bec47..6f73e4943d5aec9aee8009176d62388cb24b5db9 100644 (file)
@@ -1140,9 +1140,9 @@ rspamd_recipients_distance (struct worker_task *task, GList * args, void *unused
 #ifdef GMIME24
        for (i = 0; i < num; i ++) {
                addr = internet_address_list_get_address (cur, i);
-               ar[i].name = memory_pool_strdup (task->task_pool, internet_address_get_name (addr));
+               ar[i].name = internet_address_mailbox_get_addr (
+                                               INTERNET_ADDRESS_MAILBOX (addr));
                if (ar[i].name != NULL && (c = strchr (ar[i].name, '@')) != NULL) {
-                       *c = '\0';
                        ar[i].addr = c + 1;
                }
        }