Permalink
Browse files

Allow equal sign in local part of email address

  • Loading branch information...
fabn committed Oct 19, 2012
1 parent 2cc5183 commit bdf3a34cf4d17e9ef529d12c07ecba5a60eda73e
Showing with 8 additions and 3 deletions.
  1. +3 −2 patterns/postfix
  2. +5 −1 spec/postfix_spec.rb
View
@@ -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
@@ -15,9 +15,13 @@
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",

0 comments on commit bdf3a34

Please sign in to comment.