hostname variable in attachment replacement

Julian Field MailScanner at ecs.soton.ac.uk
Fri Aug 7 15:27:32 IST 2009



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

-- 
Julian Field MEng CITP CEng
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store

Need help customising MailScanner?
Contact me!
Need help fixing or optimising your systems?
Contact me!
Need help getting you started solving new requirements from your boss?
Contact me!

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
Follow me at twitter.com/JulesFM and twitter.com/MailScanner


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the MailScanner mailing list