0

My problem is with exim.conf where i try to set hostname using perl

In exim.conf

host = "${perl{func}{arg}}"

In exim.pl.local its accessing Exim variable from exim.conf in following way

my $phost   = Exim::expand_string('$primary_hostname');

However, the value is not getting evaluated and the value of "$phost" comes out to be literal as follow.

print $phost   //outputs ${perl{func}{arg}}.

Any way i can change the code in exim.conf or exim.pl.local to get the result of the subroutine?

Tech2002
  • 1
  • 1

1 Answers1

0

in /etc/exam.pl.local

sub getprimaryhost {
   my $phost   = Exim::expand_string('$primary_hostname');
   return $phost;
}

then in /etc/exim.conf

smtp_active_hostname = ${perl{'getprimaryhost'}}

smtp_active_hostname will be set to what ever the sub returns in the case above it will be the value of primary_hostname. Also this does not seem to work for primary_hostname.