[Dovecot] Sort output of dovecot -n alphabetically?
Is there a way? Postfix does this by default, and it makes it much less likely to miss/overlook a setting...
If there is no way, any chance to modify it so that it does?
Thanks for dovecot! Really looking forward to 1.1 release!
--
Best regards,
Charles
--On Thursday, May 22, 2008 08:46:15 AM -0400 Charles Marcus CMarcus@Media-Brokers.com wrote:
Is there a way? Postfix does this by default, and it makes it much less likely to miss/overlook a setting...
Just pipe it through sort:
dovecot -n | sort
That should even be possible with Windows.
Greetings,
Jens
On 5/22/2008 8:57 AM, Jens Dönhoff wrote:
Is there a way? Postfix does this by default, and it makes it much less likely to miss/overlook a setting...
Just pipe it through sort:
dovecot -n | sort
But then *everything* gets sorted (I tried before posting), so its not acceptable solution:
host ~ # dovecot -n | sort # 1.1.rc5: /etc/dovecot/dovecot.conf args: * auth default: driver: pam driver: passwd listen: [::] login_dir: /var/run/dovecot/login login_executable: /usr/libexec/dovecot/imap-login mail_location: maildir:~/.maildir passdb: ssl_cert_file: /etc/ssl/dovecot/server.pem ssl_key_file: /etc/ssl/dovecot/server.key userdb:
And no, this is not complete output...
--
Best regards,
Charles
On Thu, May 22, 2008 at 09:08:13AM -0400, Charles Marcus wrote:
On 5/22/2008 8:57 AM, Jens Dönhoff wrote:
Is there a way? Postfix does this by default, and it makes it much less likely to miss/overlook a setting...
Just pipe it through sort:
dovecot -n | sort
But then *everything* gets sorted (I tried before posting), so its not
acceptable solution:host ~ # dovecot -n | sort # 1.1.rc5: /etc/dovecot/dovecot.conf args: * auth default: driver: pam driver: passwd listen: [::] login_dir: /var/run/dovecot/login login_executable: /usr/libexec/dovecot/imap-login mail_location: maildir:~/.maildir passdb: ssl_cert_file: /etc/ssl/dovecot/server.pem ssl_key_file: /etc/ssl/dovecot/server.key userdb:
And no, this is not complete output...
The following seems to work reasonably well: dovecot -n | sed -n '1h;2,$H;${g;s/\n /xnlx/g;p}' | sort | sed 's/xnlx/\n/g'
Not my invention though, just got this contraption from somewhere else..
regards, Bjorge
On 5/22/2008, Bjorge Dijkstra (bjd@jooz.net) wrote:
The following seems to work reasonably well: dovecot -n | sed -n '1h;2,$H;${g;s/\n /xnlx/g;p}' | sort | sed 's/xnlx/\n/g'
Sorry... this shoul dbe done as part of the command itself - I don't fancy using a hack like that...
I'll wait and see if Timo is willing to do it - hopefully he'll see the value - if not...
--
Best regards,
Charles
On Thu, 2008-05-22 at 08:46 -0400, Charles Marcus wrote:
Is there a way? Postfix does this by default, and it makes it much less likely to miss/overlook a setting...
If there is no way, any chance to modify it so that it does?
I'd rather not touch that code until it gets rewritten with v2.0. Also I kind of like it that the current way lists them in the same order as they're in dovecot-example.conf.
On 5/24/2008, Timo Sirainen (tss@iki.fi) wrote:
Is there a way? Postfix does this by default, and it makes it much less likely to miss/overlook a setting...
If there is no way, any chance to modify it so that it does?
I'd rather not touch that code until it gets rewritten with v2.0. Also I kind of like it that the current way lists them in the same order as they're in dovecot-example.conf.
I can definitely see the value in both, and didn't mean to suggest that the current behavior be replaced... so, maybe in 2.0, make the default the way it is now, and add a sort switch (dovecot -ns?) to sort them alphabetically?
It really does make it easier to find a specific setting, and/or make sure you're not missing something.
--
Best regards,
Charles
participants (4)
-
Bjorge Dijkstra
-
Charles Marcus
-
Jens Dönhoff
-
Timo Sirainen