summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-12-01 17:03:00 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-12-01 17:03:00 +0300
commita82935802cfcb329ff0ed70a34cc3557d69779ca (patch)
tree71b19ef9af713c42f0154b19eaabdab37f7fc374
parent51d40c08d3d3ed80f84e15c72f4b71b9865cb7b6 (diff)
downloadrspamd-a82935802cfcb329ff0ed70a34cc3557d69779ca.tar.gz
rspamd-a82935802cfcb329ff0ed70a34cc3557d69779ca.zip
Ignore something that looks like email but has no username.
-rw-r--r--src/url.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/url.c b/src/url.c
index 89abe5edc..8e0449093 100644
--- 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 {