]> source.dussan.org Git - rspamd.git/commitdiff
Ignore something that looks like email but has no username.
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Thu, 1 Dec 2011 14:03:00 +0000 (17:03 +0300)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Thu, 1 Dec 2011 14:03:00 +0000 (17:03 +0300)
src/url.c

index 89abe5edc1de0d77ca29f88b78e9b1dd64921dc6..8e0449093987684380163ba74cc86a44aee172f2 100644 (file)
--- a/src/url.c
+++ b/src/url.c
@@ -1195,8 +1195,10 @@ url_parse_text (memory_pool_t * pool, struct worker_task *task, struct mime_text
                                                        ex->pos = url_start - begin;
                                                        ex->len = url_end - url_start;
                                                        if (new->protocol == PROTOCOL_MAILTO) {
-                                                               if (!g_tree_lookup (task->emails, new)) {
-                                                                       g_tree_insert (task->emails, new, new);
+                                                               if (new->userlen > 0) {
+                                                                       if (!g_tree_lookup (task->emails, new)) {
+                                                                               g_tree_insert (task->emails, new, new);
+                                                                       }
                                                                }
                                                        }
                                                        else {