Allow empty senderIp and default to 127.0.0.1.
This commit is contained in:
parent
745addd5d1
commit
4fdc8b1798
1 changed files with 2 additions and 4 deletions
|
|
@ -34,11 +34,9 @@ my $webguiRoot = '/data/WebGUI';
|
||||||
my $session = openSession( $webguiRoot, $configFile );
|
my $session = openSession( $webguiRoot, $configFile );
|
||||||
no warnings 'once';
|
no warnings 'once';
|
||||||
*{ WebGUI::Session::Env::getIp } = sub {
|
*{ WebGUI::Session::Env::getIp } = sub {
|
||||||
return $senderIp;
|
return $senderIp || '127.0.0.1';
|
||||||
};
|
};
|
||||||
|
|
||||||
$session->log->warn( "IP is : [$senderIp][" .$session->env->getIp ."]");
|
|
||||||
|
|
||||||
WebGUI::MailCommand::processCommand( $session, $command, $id, $sender );
|
WebGUI::MailCommand::processCommand( $session, $command, $id, $sender );
|
||||||
|
|
||||||
closeSession( $session );
|
closeSession( $session );
|
||||||
|
|
@ -65,7 +63,7 @@ sub getCredentials {
|
||||||
warn "--domain parameter is required" && exit( $WRONG_USAGE ) unless $domain;
|
warn "--domain parameter is required" && exit( $WRONG_USAGE ) unless $domain;
|
||||||
warn "--user parameter is required" && exit( $WRONG_USAGE ) unless $user;
|
warn "--user parameter is required" && exit( $WRONG_USAGE ) unless $user;
|
||||||
warn "--sender parameter is required" && exit( $WRONG_USAGE ) unless $sender;
|
warn "--sender parameter is required" && exit( $WRONG_USAGE ) unless $sender;
|
||||||
warn "--senderIp parameter is required" && exit( $WRONG_USAGE ) unless $senderIp;
|
#warn "--senderIp parameter is required" && exit( $WRONG_USAGE ) unless $senderIp;
|
||||||
|
|
||||||
my $dispatch = WebGUI::Config->new( $webguiRoot, 'mailing_dispatch.config' )
|
my $dispatch = WebGUI::Config->new( $webguiRoot, 'mailing_dispatch.config' )
|
||||||
|| warn "Cannot open $webguiRoot/etc/mailing_dispatch.config" && exit( $CONFIG_ERROR );
|
|| warn "Cannot open $webguiRoot/etc/mailing_dispatch.config" && exit( $CONFIG_ERROR );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue