"include path-to-conf-files" in 4.78.9

Jules Field MailScanner at ecs.soton.ac.uk
Thu Aug 27 17:56:22 IST 2009


I have just published the work I did last night, as described below.
Please download 4.78.13 from the usual place.

All the scripts and files such as /etc/sysconfig/MailScanner will now 
read MailScanner.conf settings with support for included files.

Jules.

On 27/08/2009 01:06, Jules Field wrote:
>
>
> On 26/08/2009 21:30, Mike Wallace wrote:
>> I hate to spoil your holiday but I tried 4.78.12 and still found some 
>> issues.
>>
>> 1)    In my configuration I am using all of the default values in 
>> MailScanner.conf for these headers and %org-name% is not being inserted:
>>
>> Information Header
>> ID Header
>> Spam Header
>> Envelope From Header
>>
>> Don't know if this is true for all default Headers that don't get 
>> overridden.
> The %variables% are substituted when the conf files are read, ie. at 
> "compile time".
> Otherwise, to substitute them when the value is calculated, I would 
> have to know exactly where each variable was set and what value the 
> variables all had at that time.
> All I can suggest is an include line after the initial %var% setting 
> near the top of MailScanner.conf, which sets your values of the 
> %variables%. Then at the bottom you include your new local settings, 
> and so everything in the MailScanner.conf file (and all included 
> files) will inherit your values of them.
>
> Whenever I evaluate "MailScanner Header =" in MailScanner when it is 
> running, I cannot easily know exactly what %variables% were set to 
> what where the "MailScanner Header" was defined by you (as you 
> probably will have the default value + at least 1 over-ride for it). I 
> can only substitute all the %% stuff in when "MailScanner Header =" is 
> read in at the start.
>
> The other solution is, when you redefine a %% that is used by a whole 
> bunch of settings, you also redefine each of the settings that uses 
> it, so they all inherit *your* %% definition, and not mine.
>
> Sorry, but I cannot see any way around this.
>>
>> 2)    I did not get "Spam Score Header" inserted even though "Spam 
>> Score = yes".
> Don't know about that one, but it may be related to (1).
>>
>> 3)    In my include I have %report-dir% = 
>> /etc/MailScanner/reports/myreports, this is not being overridden I am 
>> getting the default reports.
> See (1).
>>
>> 4)    Putting the MTA in an include file breaks 
>> /etc/sysconfig/MailScanner as it's extracting the MTA from 
>> /etc/MailScanner/MailScanner.conf.
> I have written a new /usr/sbin/Quick.Peek script which is called from 
> all the places like /etc/sysconfig/MailScanner to search all the 
> included files correctly for your over-rides.
>>
>> That's all I've found so far.
> All very much appreciated.
>
> Jules.
>
> P.S. Now I must go to bed, it's just gone 1 am ...
>
>> On Aug 26, 2009, at 5:57 PM, Jules Field wrote:
>>
>>> Correction. Teensy bug removed, which you would hopefully not hit 
>>> anyway, but might if your main MailScanner.conf file is very old.
>>>
>>> Try 4.78.12.
>>>
>>> On 26/08/2009 22:19, Jules Field wrote:
>>>> Should be all fixed now. Sorry for the lousy testing on my part 
>>>> before I released 10.
>>>> 11 correctly picks up %org-name% and "Run As User" when set in an 
>>>> included file, no problems. So all the others should work correctly 
>>>> now too.
>>>>
>>>> Please give 11 a try.
>>>>
>>>> As for the website, it has definitely been updated, so I suspect 
>>>> your browser's caching it.
>>>>
>>>> Cheers,
>>>> Jules.
>>>>
>>>> On 26/08/2009 21:49, Mike Wallace wrote:
>>>>> I found a couple of things
>>>>>
>>>>> 1) I like how MailScanner --lint shows what configuration files 
>>>>> were read and my configuration was read last.
>>>>> 2) Found a couple of parameters that are still not being imported 
>>>>> from my config:
>>>>>
>>>>>    %org-name% =
>>>>>    Run As User =
>>>>>    Run As Group =
>>>>>
>>>>> The org-name shows up when running --lint "ERROR: The 
>>>>> "envelope_sender_header" in your spam.assassin.prefs.conf is not 
>>>>> correct, it should match X-yoursite-MailScanner-From". In 78.9 the 
>>>>> message was "ERROR: The "envelope_sender_header" in your 
>>>>> spam.assassin.prefs.conf is not correct, it should match 
>>>>> X-mlrw_com-MailScanner-From".
>>>>>
>>>>> As for the Run As, when I do a ps I see that MailScanner is 
>>>>> running as root and not postfix.
>>>>>
>>>>> 3) One thing to help with debugging would be if you had a command 
>>>>> like postconf to display what configuration parameters are being 
>>>>> used. Or could you guide me on how to dump the configuration.
>>>>> 4) The link on the MailScanner website still shows 4.78.9 as the 
>>>>> current beta release.
>>>>>
>>>>> Thanks for the help.
>>>>>
>>>>> Mike
>>>>>
>>>>> On Aug 26, 2009, at 3:03 PM, Jules Field wrote:
>>>>>
>>>>>> Can you do me a big favour and give it a good try and report back 
>>>>>> if anything doesn't work?
>>>>>>
>>>>>> Thanks!
>>>>>> Jules.
>>>>>>
>>>>>> On 26/08/2009 16:22, Mike Wallace wrote:
>>>>>>> Jules,
>>>>>>>
>>>>>>> Thanks, I'm glad you liked my suggestion.
>>>>>>>
>>>>>>> I didn't expect any updates until next week when you got back to 
>>>>>>> the UK.
>>>>>>>
>>>>>>> You are a gentleman and a scholar.
>>>>>>>
>>>>>>> Mike
>>>>>>>
>>>>>>> On Aug 26, 2009, at 11:08 AM, Jules Field wrote:
>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On 25/08/2009 18:36, Mike Wallace wrote:
>>>>>>>>> Jules,
>>>>>>>>>
>>>>>>>>> I hope you are enjoying or enjoyed (based on when you read 
>>>>>>>>> this) your well deserved vacation in the States.
>>>>>>>> "Enjoying" thanks :-)
>>>>>>>>>
>>>>>>>>> I have been playing with "include path-to-conf-files" in 
>>>>>>>>> 4.78.9 and found a couple of limitations that I want to verify.
>>>>>>>>>
>>>>>>>>> It seems that the following parameters are ignored when in the 
>>>>>>>>> include file:
>>>>>>>>>
>>>>>>>>> %org-name% =
>>>>>>>>> %org-long-name% =
>>>>>>>>> %web-site% =
>>>>>>>>> Run As User =
>>>>>>>>> Run As Group =
>>>>>>>>> MTA =
>>>>>>>>>
>>>>>>>>> Is this by design or a "feature"? Are their other parameters 
>>>>>>>>> that can't be in the include file?
>>>>>>>> Fixed.
>>>>>>>>>
>>>>>>>>> The reason I ask is that I am trying to put all of my site 
>>>>>>>>> specific configuration changes in the include file so that the 
>>>>>>>>> only thing I have to do to MailScanner.conf is add "include 
>>>>>>>>> /etc/MailScanner/config/mysite.conf".
>>>>>>>>>
>>>>>>>>> It would be awesome if you had "include 
>>>>>>>>> /etc/MailScanner/config/*.conf" in MailScanner.conf.  Then if 
>>>>>>>>> the directory or and/or any files in that directory did not 
>>>>>>>>> exist, they would be ignored. That way those who don't want to 
>>>>>>>>> use it can edit the configuration file like they always have.
>>>>>>>> Done. I've called it "/conf.d/" instead of your "/config/" as 
>>>>>>>> that is more standard these days.
>>>>>>>> There should be a little README file in that directory so it 
>>>>>>>> has something short to parse so the include line at the very 
>>>>>>>> end of MailScanner.conf won't whine that it couldn't find any 
>>>>>>>> files matching conf.d/*.
>>>>>>>>
>>>>>>>> I have just released 4.78.10 for your pleasure :-)
>>>>>>>>
>>>>>>>> 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.
>>>>>>>>
>>>>>>>> -- 
>>>>>>>> MailScanner mailing list
>>>>>>>> mailscanner at lists.mailscanner.info
>>>>>>>> http://lists.mailscanner.info/mailman/listinfo/mailscanner
>>>>>>>>
>>>>>>>> Before posting, read http://wiki.mailscanner.info/posting
>>>>>>>>
>>>>>>>> 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.
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>> 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.
>>>>>>
>>>>>> -- 
>>>>>> MailScanner mailing list
>>>>>> mailscanner at lists.mailscanner.info
>>>>>> http://lists.mailscanner.info/mailman/listinfo/mailscanner
>>>>>>
>>>>>> Before posting, read http://wiki.mailscanner.info/posting
>>>>>>
>>>>>> 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.
>>>>>>
>>>>>
>>>>
>>>> Jules
>>>>
>>>
>>> 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.
>>>
>>> -- 
>>> MailScanner mailing list
>>> mailscanner at lists.mailscanner.info
>>> http://lists.mailscanner.info/mailman/listinfo/mailscanner
>>>
>>> Before posting, read http://wiki.mailscanner.info/posting
>>>
>>> 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.
>>>
>>
>
> Jules
>

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