Permalink
Browse files

anglebrackets: increase penalty, prefix log msgs

  • Loading branch information...
1 parent bcc6ada commit 45316487e3c2e383b11e42af12e84199561a6790 @msimerson msimerson committed Dec 18, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 plugins/dont_require_anglebrackets
@@ -24,19 +24,19 @@ MAIL FROM:user@example.com
sub hook_mail_pre {
my ($self, $transaction, $addr) = @_;
unless ($addr =~ /^<.*>$/) {
- $self->log(LOGINFO, "added MAIL angle brackets");
$addr = '<' . $addr . '>';
- $self->adjust_karma(-1);
+ $self->adjust_karma(-2);
+ $self->log(LOGINFO, "fail, added MAIL angle brackets");
}
return (OK, $addr);
}
sub hook_rcpt_pre {
my ($self, $transaction, $addr) = @_;
unless ($addr =~ /^<.*>$/) {
- $self->log(LOGINFO, "added RCPT angle brackets");
$addr = '<' . $addr . '>';
- $self->adjust_karma(-1);
+ $self->adjust_karma(-2);
+ $self->log(LOGINFO, "fail, added RCPT angle brackets");
}
return (OK, $addr);
}

0 comments on commit 4531648

Please sign in to comment.