Understanding and configuring HeaderManager
HeaderManager needs two ways of input:
- command line arguments
- a configuration file
Syntax: hm filename configfile logfile [/clean|/detect]
- filename: file to check
- configfile: HM configuration file
- logfile: log file
- clean: change file (default)
- detect: detect only, do not change file
The "filename" is the file which will be checked and changed.
The configuration file contains section headers and keys, for example:
[License]
[removeheader]
HeaderName1=Received:
NumberOfTimes1=4
HeaderName2=Priority:
;NumberOfTimes2=0
;ReplaceNumberOfTimes 0 means: all
[removevalue]
HeaderName1=X-URL:
;NumberOfTimes1=0
[locateandreplacevalue]
HeaderName1=Received:
LookFor1="Exch"
NewValue1=" by ESMTP server"
[replacevalue]
HeaderName1=Received:
Value1=" by someone from somewhere"
NumberOfTimes1=1
[addheader]
ReplyBy=96:30
HeaderName1=X-Header-Manager:
Value1=" Changed by Header Manager 1.01"
Except for the license section, each section supports an action on headers.
An optional "NumberOfTimesx" key may be used to limit the number of operations on "HeaderNamex". The value 0 means: unlimited.
If the NumberOfTimes key is missing, the default value is used.
To temporarily disable a setting, prefix a semi-colon (';') before the key name.
Up to 100 header types can be checked in each section, starting with 1 and
ending with 100. Keys must have a sequential number. When a number is missing, keys with higher numbers will not be processed.
Double quotes ('"') should be used for values that include prefixed spaces.
Always include a space before the value of a header.
Description of sections:
- removeheader: removes headers by header name
- removevalue: removes values by header name
- locateandreplacevalue: locate a string ("LookForx") in a value and if found, replace the entire value
- replacevalue: replaces values by header name
- addheader: add a header and value.
- addheader/ReplyBy: adds a Reply-By header with an offset of current system time in hours:minutes format. Outlook users will see this when the message is received. This can be used to inform users that a reply must be send within a pre-determined period.
Actions are carried out in this order. Entire headers are removed before
removing the value of a header.