Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Plugin.pm: get_rejects accepts an optional 'info' message

which, when supplied, is appended to the log message
  • Loading branch information...
commit c1ab3b5596481f3e90b27c1e1947bb1f84ca1fc9 1 parent cbd1be7
@msimerson authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/Qpsmtpd/Plugin.pm
View
4 lib/Qpsmtpd/Plugin.pm
@@ -213,6 +213,8 @@ sub compile {
sub get_reject {
my $self = shift;
my $message = shift || "why didn't you pass an error message?";
+ my $log_info = shift || '';
+ $log_info = ", $log_info" if $log_info;
my $reject = $self->{_args}{reject};
if ( defined $reject && ! $reject ) {
@@ -228,7 +230,7 @@ sub get_reject {
};
# they asked for reject, we give them reject
- $self->log(LOGINFO, 'fail');
+ $self->log(LOGINFO, 'fail'.$log_info);
return ( $self->get_reject_type(), $message);
};
Please sign in to comment.
Something went wrong with that request. Please try again.