System variables in MailScanner.conf
Lars Kristiansen
lars+lister.mailscanner at ADVENTURAS.NO
Wed Jul 13 16:03:59 IST 2005
[ The following text is in the "iso-8859-1" character set. ]
[ Your display is set for the "US-ASCII" character set. ]
[ Some characters may be displayed incorrectly. ]
>>> Looks like it's a FreeBSD thing as my FreeBSD boxes (5.3 & 5.4) all
>>> like
>>> $HOST and 'Undefined Variable' $HOSTNAME
>>
>
> Actually, just took a look at 'man bash', it says "HOSTNAME" automatically
> set to the name of the current host. :-)
>
> Chen
And something similar is mentioned for "HOST" in 'man tcsh'.
csh (actually tcsh) is default root shell in freebsd if that was not clear.
And by the way, if HOSTNAME is set in /root/.cshrc,
"echo ${HOST}${HOSTNAME}" will return hostname twice, at least in terminal.
If not set it will only return this error message:
"HOSTNAME: Undefined variable." instead of any output at all.
Not tested if output is different if not called from a terminal, though.
--
Hilsen from Lars
>
>> Maybe HOSTNAME is set by the shell, works in bash.
>> A grep for HOSTNAME returns among others these:
>> /etc/profile:
>> HOSTNAME=`/bin/hostname`; export HOSTNAME
>>
>> So you I guess you would have to put in
>> /etc/csh.login or in ~/.cshrc
>> setenv HOSTNAME `/bin/hostname`
>>
>>
>> --
>> Med vennlig hilsen
>> Lars Kristiansen
>>
>> A D V E N T U R A S
>> Tlf: 22 20 59 90
>> Fax: 22 20 59 91
>> lars at adventuras.no
>> http://www.adventuras.no
>>
>> ------------------------ MailScanner list ------------------------
>> To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
>> 'leave mailscanner' in the body of the email.
>> Before posting, read the Wiki (http://wiki.mailscanner.info/) and
>> the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
>>
>> Support MailScanner development - buy the book off the website!
>>
>
>
> ===========================================
> Yu Chen
> Howard Hughes Medical Institute
> Chemistry Building, Rm 182
> University of Maryland at Baltimore County
> 1000 Hilltop Circle
> Baltimore, MD 21250
>
> phone: (410)455-6347 (primary)
> (410)455-2718 (secondary)
> fax: (410)455-1174
> email: chen at hhmi.umbc.edu
> ===========================================
>
> ------------------------ MailScanner list ------------------------
> To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
> 'leave mailscanner' in the body of the email.
> Before posting, read the Wiki (http://wiki.mailscanner.info/) and
> the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
>
> Support MailScanner development - buy the book off the website!
>
------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
Support MailScanner development - buy the book off the website!
More information about the MailScanner
mailing list