hostname variable in attachment replacement

Erik Bloodaxe E.Bloodaxe at gold.ac.uk
Thu Aug 6 11:09:16 IST 2009


Julian Field wrote:
> As clearly shown in the example file supplied in 
> /etc/MailScanner/reports/en/stored.filename.message.txt,
>
> 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
>>
>> Regards
>>
>> Erik
>>
>
> Jules
>
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. 

Is there any other way to acheive this?

Erik



More information about the MailScanner mailing list