aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/email_addr.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-02-06 14:47:20 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-02-06 14:47:20 +0000
commit11fafb3cde34c6ebbc0d4b1d694e2185aa27ae27 (patch)
tree510b547f58a2e753d629be46165fc86149c92e73 /src/libmime/email_addr.c
parent6007d9d998b15934641b002c9d99ffd43a9a70cf (diff)
downloadrspamd-11fafb3cde34c6ebbc0d4b1d694e2185aa27ae27.tar.gz
rspamd-11fafb3cde34c6ebbc0d4b1d694e2185aa27ae27.zip
[Project] Add heuristical from parser to received parser
Diffstat (limited to 'src/libmime/email_addr.c')
-rw-r--r--src/libmime/email_addr.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/libmime/email_addr.c b/src/libmime/email_addr.c
index b8d4b04f9..38de7b4f7 100644
--- a/src/libmime/email_addr.c
+++ b/src/libmime/email_addr.c
@@ -496,30 +496,4 @@ rspamd_email_address_list_destroy (gpointer ptr)
}
g_ptr_array_free (ar, TRUE);
-}
-
-void rspamd_smtp_maybe_process_smtp_comment (struct rspamd_task *task,
- const char *data, size_t len,
- struct received_header *rh)
-{
- if (!rh->by_hostname) {
- /* Heuristic to detect IP addresses like in Exim received:
- * [xxx]:port or [xxx]
- */
-
- if (*data == '[' && len > 2) {
- const gchar *p = data + 1;
- gsize iplen = rspamd_memcspn (p, "]", len - 1);
-
- if (iplen > 0) {
- guchar tbuf[sizeof(struct in6_addr) + sizeof(guint32)];
-
- if (rspamd_parse_inet_address_ip4 (p, iplen, tbuf) ||
- rspamd_parse_inet_address_ip6 (p, iplen, tbuf)) {
- rh->comment_ip = rspamd_mempool_alloc (task->task_pool, iplen + 1);
- rspamd_strlcpy (rh->comment_ip, p, iplen + 1);
- }
- }
- }
- }
} \ No newline at end of file