hostname variable in attachment replacement

Julian Field MailScanner at ecs.soton.ac.uk
Thu Aug 6 11:40:36 IST 2009



On 06/08/2009 11:09, Erik Bloodaxe wrote:
> 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.
Have you set the "Hostname" setting in MailScanner.conf?

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