diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-04-25 10:10:16 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-04-25 10:10:16 +0100 |
commit | 5ea8345fa3deb583cc99d9d7aa7659b90aad3743 (patch) | |
tree | 9e3d737fea0e9cedf822b1237fb5298ce532de44 /src/ragel | |
parent | a8ed49768138129c1d4f92e1adae5803219b21cb (diff) | |
download | rspamd-5ea8345fa3deb583cc99d9d7aa7659b90aad3743.tar.gz rspamd-5ea8345fa3deb583cc99d9d7aa7659b90aad3743.zip |
[Feature] Unescape and unquote smtp addresses
Diffstat (limited to 'src/ragel')
-rw-r--r-- | src/ragel/smtp_addr_parser.rl | 4 | ||||
-rw-r--r-- | src/ragel/smtp_address.rl | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/ragel/smtp_addr_parser.rl b/src/ragel/smtp_addr_parser.rl index 64e1ae4fb..55b8eefb0 100644 --- a/src/ragel/smtp_addr_parser.rl +++ b/src/ragel/smtp_addr_parser.rl @@ -33,6 +33,10 @@ } } + action User_has_backslash { + addr->flags |= RSPAMD_EMAIL_ADDR_HAS_BACKSLASH; + } + action Quoted_addr { addr->flags |= RSPAMD_EMAIL_ADDR_QUOTED; } diff --git a/src/ragel/smtp_address.rl b/src/ragel/smtp_address.rl index 3c2a86ee6..fddafe59d 100644 --- a/src/ragel/smtp_address.rl +++ b/src/ragel/smtp_address.rl @@ -24,7 +24,7 @@ Atom = atext+; Dot_string = Atom ("." Atom)*; - QcontentSMTP = qtextSMTP | quoted_pairSMTP; + QcontentSMTP = qtextSMTP | quoted_pairSMTP %User_has_backslash; Quoted_string = ( DQUOTE QcontentSMTP* >User_start %User_end DQUOTE ) %Quoted_addr; Local_part = Dot_string >User_start %User_end | Quoted_string; String = Atom | Quoted_string; |