Permalink
Browse files

anglebrackets: emit log entry when change made

  • Loading branch information...
1 parent 691955c commit edacbf914c3adf6b98a0ecdabdf5dd4e20b9cace @msimerson msimerson committed with rspier May 18, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 plugins/dont_require_anglebrackets
@@ -24,15 +24,17 @@ 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);
}
sub hook_rcpt_pre {
my ($self,$transaction, $addr) = @_;
unless ($addr =~ /^<.*>$/) {
- $addr = "<".$addr.">";
+ $self->log(LOGINFO, "added RCPT angle brackets");
+ $addr = '<'.$addr.'>';
}
return (OK, $addr);
}

0 comments on commit edacbf9

Please sign in to comment.