Allow empty senderIp and default to 127.0.0.1.
This commit is contained in:
parent
dbf935e98b
commit
5418008419
1 changed files with 2 additions and 4 deletions
|
|
@ -34,11 +34,9 @@ my $webguiRoot = '/data/WebGUI';
|
|||
my $session = openSession( $webguiRoot, $configFile );
|
||||
no warnings 'once';
|
||||
*{ 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 );
|
||||
|
||||
closeSession( $session );
|
||||
|
|
@ -65,7 +63,7 @@ sub getCredentials {
|
|||
warn "--domain parameter is required" && exit( $WRONG_USAGE ) unless $domain;
|
||||
warn "--user parameter is required" && exit( $WRONG_USAGE ) unless $user;
|
||||
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' )
|
||||
|| warn "Cannot open $webguiRoot/etc/mailing_dispatch.config" && exit( $CONFIG_ERROR );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue