On Mon, Sep 21, 2009 at 03:33:22PM +0100, David Southwell wrote:

> Is there an independent main.cf format checking tool that will identify any 
> errors in the file? Even better one that analyses the main.cf and points out 
> weaknesses would be even more welcome!!!

Syntax errors are easy to detect, "postconf -n" complains if there are
syntax errors. Note, mis-spelled parameter names are NOT syntax errors,
because in additional to built-in settings, you are free to define and
use custom parameter values. The syntax of main.cf is simple:

        parameter1 = value1
        parameter2 = value2
        ...
        parameterN = valueN

Complicated a bit by special treatment of comments and white-space.

Semantic errors, are much harder to detect. Here any tool would need to
determine whether the file content matches your intent, and this is not
generally possible.

It may be useful to highlight for review parameter names that are not
known to "postconf -d" (i.e. not built-in). Also any parameters defined
more than once (the last value wins, but there really should be just one
setting of each parameter).

Machine analysis of unwise restriction class definitions is very difficult.

-- 
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majord...@postfix.org?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.

Reply via email to