Commit 93c3add0 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Whitespace cleanup

parent 38b3c589
# Postfix SMTP Access delegation protocol support module
# Copyright (C) 2009, AllWorldIT
# Copyright (C) 2009-2014, AllWorldIT
# Copyright (C) 2008, LinuxRulz
#
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
......@@ -77,7 +77,7 @@ sub protocol_init {
sub protocol_check {
my ($server,$buffer) = @_;
my $log = defined($server->{'config'}{'logging'}{'protocols'});
# If we not enabled, don't do anything
return undef if (!$config{'enable'});
......@@ -117,7 +117,7 @@ sub protocol_parse {
# Process response
sub protocol_response
sub protocol_response
{
my ($server,$resp,$data) = @_;
my $log = defined($server->{'config'}{'logging'}{'protocols'});
......@@ -199,13 +199,13 @@ sub protocol_response
$response_data = $data;
$server->log(LOG_DEBUG,"[PROTOCOL/Postfix] Received PROTO_DB_ERROR with response '$response':'$response_data'") if ($log);
return CBP_STOP;
} elsif ($resp == PROTO_DATA_ERROR) {
$response = "DEFER";
$response_data = $data;
$server->log(LOG_DEBUG,"[PROTOCOL/Postfix] Received PROTO_DATA_ERROR with response '$response':'$response_data'") if ($log);
return CBP_STOP;
# Fallthrough
} else {
$server->log(LOG_ERR,"[PROTOCOL/Postfix] Cannot understand response code '$resp'");
......@@ -215,7 +215,7 @@ sub protocol_response
# Get protocol response
sub protocol_getresponse
sub protocol_getresponse
{
my $resp;
......@@ -236,7 +236,7 @@ sub protocol_getresponse
sub protocol_validate {
my ($server,$request) = @_;
my $log = defined($server->{'config'}{'logging'}{'protocols'});
# Check params
if (!defined($request->{'protocol_state'})) {
......@@ -258,7 +258,7 @@ sub protocol_validate {
if ($request->{'protocol_state'} eq "RCPT") {
if (!defined($request->{'recipient'}) || !($request->{'recipient'} =~ /^\S+@\S+$/) ) {
my $recipient = defined($request->{'recipient'}) ? "'".$request->{'recipient'}."'" : "undef";
my $recipient = defined($request->{'recipient'}) ? "'".$request->{'recipient'}."'" : "undef";
$server->log(LOG_ERR,"[PROTOCOLS/Postfix] Error, parameter 'recipient' cannot be $recipient") if ($log);
return "required parameter 'recipient' was not found or invalid format";
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment