hostname variable in attachment replacement

Glenn Steen glenn.steen at gmail.com
Fri Aug 7 15:36:49 IST 2009


2009/8/7 Julian Field <MailScanner at ecs.soton.ac.uk>:
>
>
> On 07/08/2009 15:23, David Lee wrote:
>>
>> On Fri, 7 Aug 2009, Randal, Phil wrote:
>>
>>> Julian Field wrote:
>>>>
>>>> "$HOSTNAME" shouldn't work in the reports, only in MailScanner.conf.
>>>> But "$hostname" should work in the reports.
>>>>
>>>> Jules
>>>
>>> But it doesn't seem to.
>>>
>>> It is a low priority for me at the moment, and my test box is a VM at
>>> home, so it will take me a while to figure out what's going on.
>>> Cheers,
>>> Phil
>>
>> Hmmm... I think there are many of us here on this list who are expecting
>> the variable to have been automatically set prior to the point of use with a
>> reasonable default (e.g. from "uname -n" or "/bin/hostname" or similar) but
>> who are finding it empty/unset.  (There may well be others here, for whom a
>> default is being set.)
>>
>> The human expectation and the computer-code reality don't marry up;
>> something somewhere (either human or machine) is going astray.
>>
>> Wouldn't it help if the MS start up code could have something like:
>>   if not set/inherited ... then set to something '/bin/hostname'-ish.
>
> I could put it in the init.d script I guess. That would be the right place
> for it. MailScanner just automatically looks up $ENV{FOOBAR} when it sees
> $FOOBAR or ${FOOBAR} in the MailScanner.conf file, it doesn't know about the
> hostname as a special case at all, and I would like to keep it that way.
>
> Jules
>
Since the /etc/network file get sourced, it is already there. The
question is if you might need an "export HOSTNAME" just after it, to
make sure the children get it... But then again, if that was needed,
my systems wouldn't be working... and they are;-).

Cheers
-- 
-- Glenn
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se


More information about the MailScanner mailing list