MailScanner ANNOUNCE: New stable release 4.78.17

Mike Wallace mike at
Sat Oct 3 19:02:24 IST 2009


How about if someone wants to break out the site variables they are  
placed in a file called "site.var" or "site.variables" in /etc/ 
MailScanner? You could then supply an empty file by default, that way  
your variable include directive in MailScanner.conf wouldn't fail.

Otherwise, the only other thing I could think of would be to change  
the include in MailScanner.conf to "include /etc/MailScanner/conf.d/ 
*.conf", change "README" to "README.conf" and have a blank "site.var"  
or "site.variables" file located in "/etc/MailScanner/conf.d" and  
called by an include in MailScanner.conf.

Anyone else have any other ideas?


On Oct 3, 2009, at 1:16 PM, Jules Field wrote:

> On 03/10/2009 16:21, Mark Sapiro wrote:
>> On Fri, Oct 02, 2009 at 04:14:14PM -0500, donald.dawson at 
>>  wrote:
>>> I am using a
>>> custom conf file in the conf.d directory.  One issue though, the
>>> %org-name% variable did not replace the 'yoursite' value from
>>> MailScanner.conf.
>>> I had to edit the /etc/MailScanner/MailScanner.conf file to replace
>>> 'yoursite' with our site name:
>> Yes. In my case, I also change %report-dir%, so I have to change
>> that too in MailScanner.conf.
>> The alternative is that every use of a %xxx% variable would have to  
>> be
>> held in abeyance until all included files are processed, and even  
>> then,
>> there might be issues if the definition of one variable includes  
>> another
>> variable.
>> The current "use the current definition of the variable when it's
>> encountered" strategy is much simpler and less prone to unintended
>> consequences, even though it requires changes in MailScanner.conf.
>> Here's a suggestion for Jules though. Immediately after defining the
>> %xxx% variables in MailScanner.conf, put
>> include /etc/MailScanner/conf.d/local_variables
>> or some such. Then the rpm or whatever can install an empty
>> /etc/MailScanner/conf.d/local_variables only if one doesn't already
>> exist. This will give the site the ability to redefine the variables
>> before they are used and allow complete configuration without  
>> touching
>> MailScanner.conf.
>> Perhaps even better, don't install /etc/MailScanner/conf.d/ 
>> local_variables
>> at all, since every site needs to supply at least %org-name%,
>> %org-long-name% and %web-site% anyway, this will strongly encourage
>> them to define these, since the include file will be missing if they
>> don't.
> I don't want to do that as it will cause new users a strange error  
> which they do not understand, leaving the software "broken by  
> default" just like 99% of other software on the market :-(
> The "local_variables" one is a better idea, but it will cause a  
> warning to be generated as the file will be read by both default  
> "include" lines. And I don't want that either.
> If you can come up with a better idea for a solution, I'm all ears :-)
> Jules
> -- 
> Julian Field MEng CITP CEng
> Buy the MailScanner book at
> 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 and
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> -- 
> MailScanner mailing list
> mailscanner at
> Before posting, read
> Support MailScanner development - buy the book off the website!
> 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