From edacbf914c3adf6b98a0ecdabdf5dd4e20b9cace Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Fri, 18 May 2012 04:25:09 -0400 Subject: [PATCH] anglebrackets: emit log entry when change made --- plugins/dont_require_anglebrackets | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/dont_require_anglebrackets b/plugins/dont_require_anglebrackets index 7bb1eea..000030a 100644 --- a/plugins/dont_require_anglebrackets +++ b/plugins/dont_require_anglebrackets @@ -24,7 +24,8 @@ MAIL FROM:user@example.com sub hook_mail_pre { my ($self,$transaction, $addr) = @_; unless ($addr =~ /^<.*>$/) { - $addr = "<".$addr.">"; + $self->log(LOGINFO, "added MAIL angle brackets"); + $addr = '<'.$addr.'>'; } return (OK, $addr); } @@ -32,7 +33,8 @@ sub hook_mail_pre { sub hook_rcpt_pre { my ($self,$transaction, $addr) = @_; unless ($addr =~ /^<.*>$/) { - $addr = "<".$addr.">"; + $self->log(LOGINFO, "added RCPT angle brackets"); + $addr = '<'.$addr.'>'; } return (OK, $addr); }