hostname variable in attachment replacement
prandal at herefordshire.gov.uk
Thu Aug 6 11:40:50 IST 2009
Erik Bloodaxe wrote:
> Julian Field wrote:
>> As clearly shown in the example file supplied in
>> Note to Help Desk: Look on $hostname in $quarantinedir/$datenumber
>> (message $id).
>> Note the "$hostname" in the line above.
>> On 06/08/2009 10:13, Erik Bloodaxe wrote:
>>> Is there a way to have a variable in the attachements that replace
>>> unacceptable file types and content that expands to the host names.
>>> I.e. in stored.filename.message.txt in etc/reports/en
>>> I want a line saying
>>> File is in: $(HOSTNAME) in $quarantinedir/$datenumber/$id
>>> so that my sysadmins can see which of the many servers the file is
>>> on as the standard reports give them no indication of which server
>>> to get the file from.
>>> I have tried all the obvious
> This does not seem to work - $hostname expands to a blank, the
> enviroment variable $HOSTNAME is set in the environment for login
> shells but appears not to be set for system started scripts, very few
> changes have been made to the default install. This is on RedHat 5.
I see that on CentOS 5.3 too, so it is no just your installation.
Phil Randal | Networks Engineer
Herefordshire Council | Deputy Chief Executive's Office | I.C.T.
Services Division Thorn Office Centre, Rotherwas, Hereford, HR2 6JT
Tel: 01432 260160
email: prandal at herefordshire.gov.uk
Any opinion expressed in this e-mail or any attached files are those of
the individual and not necessarily those of Herefordshire Council.
This e-mail and any attached files are confidential and intended solely
for the use of the addressee. This communication may contain material
protected by law from being passed on. If you are not the intended
recipient and have received this e-mail in error, you are advised that
any use, dissemination, forwarding, printing or copying of this e-mail
is strictly prohibited. If you have received this e-mail in error
please contact the sender immediately and destroy all copies of it.
More information about the MailScanner