postconf -n suggestion

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

postconf -n suggestion

Charles Marcus
Dovecot has added two lines of text to the beginning output of dovecot
-n that could possibly save some time with troubleshooting...

It adds the version on the first line, and OS/platform info on the
second line, like so:

# 1.1.11: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.23-gentoo-r9 x86_64 Gentoo Base System release 1.12.11.1

Maybe postfix could do the same with postconf -n output?

--

Best regards,

Charles
Reply | Threaded
Open this post in threaded view
|

Re: postconf -n suggestion

Wietse Venema
Charles Marcus:

> Dovecot has added two lines of text to the beginning output of dovecot
> -n that could possibly save some time with troubleshooting...
>
> It adds the version on the first line, and OS/platform info on the
> second line, like so:
>
> # 1.1.11: /etc/dovecot/dovecot.conf
> # OS: Linux 2.6.23-gentoo-r9 x86_64 Gentoo Base System release 1.12.11.1
>
> Maybe postfix could do the same with postconf -n output?

No. The output has a defined "name = value" format. Adding
cruft would break bazillions of scripts that rely on it.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: postconf -n suggestion

Charles Marcus
On 3/4/2009 11:22 AM, Wietse Venema wrote:

>> Dovecot has added two lines of text to the beginning output of dovecot
>> -n that could possibly save some time with troubleshooting...
>>
>> It adds the version on the first line, and OS/platform info on the
>> second line, like so:
>>
>> # 1.1.11: /etc/dovecot/dovecot.conf
>> # OS: Linux 2.6.23-gentoo-r9 x86_64 Gentoo Base System release 1.12.11.1
>>
>> Maybe postfix could do the same with postconf -n output?

> No. The output has a defined "name = value" format. Adding
> cruft would break bazillions of scripts that rely on it.

Understood... so, maybe another flag (postconf -z)?

Anyway, no biggie, just a suggestion...

--

Best regards,

Charles
Reply | Threaded
Open this post in threaded view
|

Re: postconf -n suggestion

Victor Duchovni
In reply to this post by Charles Marcus
On Wed, Mar 04, 2009 at 11:10:13AM -0500, Charles Marcus wrote:

> Dovecot has added two lines of text to the beginning output of dovecot
> -n that could possibly save some time with troubleshooting...
>
> It adds the version on the first line, and OS/platform info on the
> second line, like so:
>
> # 1.1.11: /etc/dovecot/dovecot.conf
> # OS: Linux 2.6.23-gentoo-r9 x86_64 Gentoo Base System release 1.12.11.1

    (
    echo $(postconf -h mail_name mail_version mail_release_date)
        uname -a
    ) | sed -e 's/^/# /'
    postconf -n

--
        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:[hidden email]?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 | Threaded
Open this post in threaded view
|

Re: postconf -n suggestion

Charles Marcus
On 3/4/2009 12:26 PM, Victor Duchovni wrote:
>> Dovecot has added two lines of text to the beginning output of dovecot
>> -n that could possibly save some time with troubleshooting...
>>
>> It adds the version on the first line, and OS/platform info on the
>> second line, like so:
>>
>> # 1.1.11: /etc/dovecot/dovecot.conf
>> # OS: Linux 2.6.23-gentoo-r9 x86_64 Gentoo Base System release 1.12.11.1

>     (
>     echo $(postconf -h mail_name mail_version mail_release_date)
> uname -a
>     ) | sed -e 's/^/# /'
>     postconf -n

Thats easy for *you* to say! (ianap)

;)

I was just talking about something that would make it easier when
someone was asking for help on the list... I don't think the above will
quite accomplish that...

--

Best regards,

Charles
Reply | Threaded
Open this post in threaded view
|

Re: postconf -n suggestion

@lbutlr
In reply to this post by Wietse Venema
On 4-Mar-2009, at 09:22, Wietse Venema wrote:

> Charles Marcus:
>> Dovecot has added two lines of text to the beginning output of  
>> dovecot
>> -n that could possibly save some time with troubleshooting...
>>
>> It adds the version on the first line, and OS/platform info on the
>> second line, like so:
>>
>> # 1.1.11: /etc/dovecot/dovecot.conf
>> # OS: Linux 2.6.23-gentoo-r9 x86_64 Gentoo Base System release  
>> 1.12.11.1
>>
>> Maybe postfix could do the same with postconf -n output?
>
> No. The output has a defined "name = value" format. Adding
> cruft would break bazillions of scripts that rely on it.

version=2.4.2
uname=FreeBSD 6.2-RELEASE

??


--
Hey, baby, I've got just the cure for that penis envy back at m
        apartment...

Reply | Threaded
Open this post in threaded view
|

Re: postconf -n suggestion

Noel Jones-2
In reply to this post by Wietse Venema
Wietse Venema wrote:

> Charles Marcus:
>> Dovecot has added two lines of text to the beginning output of dovecot
>> -n that could possibly save some time with troubleshooting...
>>
>> It adds the version on the first line, and OS/platform info on the
>> second line, like so:
>>
>> # 1.1.11: /etc/dovecot/dovecot.conf
>> # OS: Linux 2.6.23-gentoo-r9 x86_64 Gentoo Base System release 1.12.11.1
>>
>> Maybe postfix could do the same with postconf -n output?
>
> No. The output has a defined "name = value" format. Adding
> cruft would break bazillions of scripts that rely on it.
>
> Wietse

There was a discussion a while back about always including
"mail_version = value" in postconf -n output.  I can't
remember why that isn't a good idea...

   -- Noel Jones
Reply | Threaded
Open this post in threaded view
|

Re: postconf -n suggestion

Rick-140
In reply to this post by Charles Marcus
At 12:52 PM 3/4/2009, Charles Marcus wrote:
> >> # 1.1.11: /etc/dovecot/dovecot.conf
> >> # OS: Linux 2.6.23-gentoo-r9 x86_64 Gentoo Base System release 1.12.11.1

If the output is name =value then could the output just be
conf = 1.1.11: /etc/dovecot/dovecot.conf
OS = Linux 2.6.23-gentoo-r9 x86_64 Gentoo Base System release 1.12.11.1

and not break things? (or something like that).


rick

Reply | Threaded
Open this post in threaded view
|

Re: postconf -n suggestion

Wietse Venema
In reply to this post by Noel Jones-2
Noel Jones:

> Wietse Venema wrote:
> > Charles Marcus:
> >> Dovecot has added two lines of text to the beginning output of dovecot
> >> -n that could possibly save some time with troubleshooting...
> >>
> >> It adds the version on the first line, and OS/platform info on the
> >> second line, like so:
> >>
> >> # 1.1.11: /etc/dovecot/dovecot.conf
> >> # OS: Linux 2.6.23-gentoo-r9 x86_64 Gentoo Base System release 1.12.11.1
> >>
> >> Maybe postfix could do the same with postconf -n output?
> >
> > No. The output has a defined "name = value" format. Adding
> > cruft would break bazillions of scripts that rely on it.
> >
> > Wietse
>
> There was a discussion a while back about always including
> "mail_version = value" in postconf -n output.  I can't
> remember why that isn't a good idea...

"postconf -n" does not list parameters unless they are set in
main.cf. The simplicity of the tool makes it useful for building
into other tools. If we start making random exceptions then we get
on a slippery slope (why stop with mail_version? why not also
include SASL and TLS, chroot stuff, and so on).

If we want to fingerprint a Postfix install, it is beter to use a
fingerprinting tool that also captures master.cf, information about
the platform itself, and Postfix build options. Patrick's saslfinger
already does most of this.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: postconf -n suggestion

Wietse Venema
In reply to this post by @lbutlr
LuKreme:

> On 4-Mar-2009, at 09:22, Wietse Venema wrote:
> > Charles Marcus:
> >> Dovecot has added two lines of text to the beginning output of  
> >> dovecot
> >> -n that could possibly save some time with troubleshooting...
> >>
> >> It adds the version on the first line, and OS/platform info on the
> >> second line, like so:
> >>
> >> # 1.1.11: /etc/dovecot/dovecot.conf
> >> # OS: Linux 2.6.23-gentoo-r9 x86_64 Gentoo Base System release  
> >> 1.12.11.1
> >>
> >> Maybe postfix could do the same with postconf -n output?
> >
> > No. The output has a defined "name = value" format. Adding
> > cruft would break bazillions of scripts that rely on it.
>
> version=2.4.2
> uname=FreeBSD 6.2-RELEASE

The "postconf -n" command lists known parameters that are
explicitly specified in main.cf.

If you want a fingerprinting tool, don't mess up postconf.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: postconf -n suggestion

@lbutlr
In reply to this post by Wietse Venema
On 4-Mar-2009, at 11:54, Wietse Venema wrote:
> "postconf -n" does not list parameters unless they are set in
> main.cf. The simplicity of the tool makes it useful for building
> into other tools. If we start making random exceptions then we get
> on a slippery slope (why stop with mail_version? why not also
> include SASL and TLS, chroot stuff, and so on).

I do agree in principle with this, but I think that for version at  
least, an exception should be made.  (OS is largely irrelevant, but  
version is pretty much critical all the time).


--
I've always had a flair for stage directions.

Reply | Threaded
Open this post in threaded view
|

Re: postconf -n suggestion

Paweł Leśniak
In reply to this post by Charles Marcus
>
> I was just talking about something that would make it easier when
> someone was asking for help on the list... I don't think the above will
> quite accomplish that...
>
>    
In many cases (I'm not gonna do statistics) new users do not post their
questions correctly - often we can see 2nd message in thread asking for
more information according to MAIL_DEBUG readme.
So I think that making changes to postconf -n output are useless. If one
will manage to read MAIL_DEBUG, one will also be able to have a look at
postfix version and other system-related informations. If not, certainly
one should not do any changes to mail server. Honestly.

Pawel Lesniak

Reply | Threaded
Open this post in threaded view
|

Re: postconf -n suggestion

Charles Marcus
On 3/4/2009 2:36 PM, Paweł Leśniak wrote:
>> I was just talking about something that would make it easier when
>> someone was asking for help on the list... I don't think the above will
>> quite accomplish that...

> In many cases (I'm not gonna do statistics) new users do not post their
> questions correctly - often we can see 2nd message in thread asking for
> more information according to MAIL_DEBUG readme.
> So I think that making changes to postconf -n output are useless. If one
> will manage to read MAIL_DEBUG, one will also be able to have a look at
> postfix version and other system-related informations. If not, certainly
> one should not do any changes to mail server. Honestly.

Irrelevant. There is nothing wrong with simplifying things...

By your argument, there is no need for the postconf tool at all...

Wietse has already explained why this will not be done, so further
discussion is useless. Personally, I don't see any reason to not add a
new flag that does this, but again - it doesn't matter what I think...

Besides, Victor did provide a way to do this on an individual basis, and
even though ianap, I may play with it a bit...

Oh, and thanks Victor for that...
Reply | Threaded
Open this post in threaded view
|

Re: postconf -n suggestion

Paweł Leśniak
W dniu 2009-03-04 20:53, Charles Marcus pisze:
> Irrelevant. There is nothing wrong with simplifying things...
>    
Simplifying does not mean changing behavior. As Wietse said, postconf -n
shows only setting from main.cf. So adding values from outside main.cf
is not simplifying at all.
> By your argument, there is no need for the postconf tool at all...
>    
Never said anything like that.

Pawel Lesniak

Reply | Threaded
Open this post in threaded view
|

Re: postconf -n suggestion

Andrew J. Caines
In reply to this post by Charles Marcus
Wietse Venema wrote:
> Making trouble reports easier requires a saslfinger-like tool that
> captures info about Postfix, the OS, build options, etc.

While not updated in a few years, postfinger[1] does a fair job of this.


[1] ftp://ftp.wl0.org/ftp.wl0.org/postfinger/

--
-Andrew J. Caines-   Unix Systems Engineer   [hidden email]
FreeBSD/Linux/Solaris, Web/Mail/Proxy/...   http://halplant.com:2001/
  "Machines take me by surprise with great frequency" - Alan Turing
Reply | Threaded
Open this post in threaded view
|

Re: postconf -n suggestion

Simon J Mudd
[hidden email] ("Andrew J. Caines") writes:

> Wietse Venema wrote:
> > Making trouble reports easier requires a saslfinger-like tool that
> > captures info about Postfix, the OS, build options, etc.
>
> While not updated in a few years, postfinger[1] does a fair job of this.
>
>
> [1] ftp://ftp.wl0.org/ftp.wl0.org/postfinger/

I don't follow postfix-users now as much as I used to. If there are
improvements that can be made to postfinger I'll certainly add them.

Simon