Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow equal sign in local part of email address

  • Loading branch information...
commit bdf3a34cf4d17e9ef529d12c07ecba5a60eda73e 1 parent 2cc5183
@fabn authored
Showing with 8 additions and 3 deletions.
  1. +3 −2 patterns/postfix
  2. +5 −1 spec/postfix_spec.rb
View
5 patterns/postfix
@@ -1,7 +1,8 @@
# maillog stuff:
QUEUEID (?:[A-F0-9]+|NOQUEUE)
-ADDRESSPART [a-zA-Z0-9_.+-]+
-ADDRESS <%{ADDRESSPART:local}@%{ADDRESSPART:remote}>
+# TODO fix this to avoid future issues
+ADDRESSPART [a-zA-Z0-9_.+=-]+
+ADDRESS <%{ADDRESSPART:local}@%{IPORHOST:remote}>
RELAY (?:%{HOSTNAME}(?:\[%{IP:ip}\]:%{POSREAL:port:int})|none|%{WORD})
POSREAL [0-9]+(.[0-9]+)?
DELAYS %{POSREAL:a:float}/%{POSREAL:b:float}/%{POSREAL:c:float}/%{POSREAL:d:float}
View
6 spec/postfix_spec.rb
@@ -16,8 +16,12 @@
describe "%{ADDRESS}" do
it_should_behave_like "a grok pattern matcher",
+ "%{ADDRESSPART}",
+ %w(bounce+user==a==cxxx.com==dxxxx)
+
+ it_should_behave_like "a grok pattern matcher",
description,
- %w(<user@example.com>),
+ %w(<user@example.com> <bounce+user==a==cxxx.com==dxxxx@lists.xxxx.org>),
%w(not_valid_address)
it_should_behave_like "a grok field matcher",
Please sign in to comment.
Something went wrong with that request. Please try again.