aboutsummaryrefslogtreecommitdiffstats
path: root/src/ragel/smtp_received.rl
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-04-02 11:59:38 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-04-02 12:00:23 +0100
commit3a8236c9344d6c757760a785510315d851bcbe62 (patch)
treebe97b46a8eedc63d43930c3bfd3d235cdf8318be /src/ragel/smtp_received.rl
parent7243cd2f76e3c691b555770090a0cade43ada32b (diff)
downloadrspamd-3a8236c9344d6c757760a785510315d851bcbe62.tar.gz
rspamd-3a8236c9344d6c757760a785510315d851bcbe62.zip
[Fix] Fix parsing of non-RFC compatible Exim received
Issue: #1575
Diffstat (limited to 'src/ragel/smtp_received.rl')
-rw-r--r--src/ragel/smtp_received.rl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ragel/smtp_received.rl b/src/ragel/smtp_received.rl
index 8b88d4ffe..ff3f10d19 100644
--- a/src/ragel/smtp_received.rl
+++ b/src/ragel/smtp_received.rl
@@ -27,9 +27,12 @@
( address_literal >Real_Domain_Start %Real_Domain_End FWS "(" TCP_info ")" ) |
address_literal >Real_IP_Start %Real_IP_End; # Not RFC conforming, but many MTA try this
+ exim_real_ip = "[" (IPv4_addr|IPv6_simple) >IP4_start %IP4_end "]"
+ >Real_IP_Start %Real_IP_End (":" digit{1,4})?;
+ exim_content = exim_real_ip;
ccontent = ctext | FWS | '(' @{ fcall balanced_ccontent; };
balanced_ccontent := ccontent* ')' @{ fret; };
- comment = "(" (FWS? ccontent)* FWS? ")";
+ comment = "(" (FWS? ccontent|exim_content)* FWS? ")";
CFWS = ((FWS? comment)+ FWS?) | FWS;
From_domain = "FROM"i FWS Extended_Domain >From_Start %From_End;