New parser: postconf -M
See original GitHub issueThe default output from the Postfix configuration utility, postconf, works very well with the ini parser, for example:
postconf | jc --ini -p
However I haven’t found a way to easily load the output when run with -M, “Show master.cf file contents instead of main.cf file contents”, for example:
postconf -M
smtp inet n - y - - smtpd
pickup unix n - y 60 1 pickup
cleanup unix n - y - 0 cleanup
qmgr unix n - n 300 1 qmgr
tlsmgr unix - - y 1000? 1 tlsmgr
rewrite unix - - y - - trivial-rewrite
bounce unix - - y - 0 bounce
defer unix - - y - 0 bounce
trace unix - - y - 0 bounce
verify unix - - y - 1 verify
flush unix n - y 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - y - - smtp
relay unix - - y - - smtp -o syslog_name=postfix/$service_name
showq unix n - y - - showq
error unix - - y - - error
retry unix - - y - - error
discard unix - - y - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - y - - lmtp
anvil unix - - y - 1 anvil
scache unix - - y - 1 scache
postlog unix-dgram n - n - 1 postlogd
maildrop unix - n n - - pipe flags=DRXhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
uucp unix - n n - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman unix - n n - - pipe flags=FRX user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user}
The columns are whitespace separated apart from the last one, the names of the columns are:
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (no) (never) (100)
# ==========================================================================
See the syntax section of the man page for further details.
Is this something that would be useful to enough people and easy enough to be worth considering implementing?
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Postfix Configuration Parameters
Default values are shown after the parameter name in parentheses, and can be looked up with the "postconf -d" command. Note: this is...
Read more >Privex's Postfix Log Parser + Web UI - GitHub
This is a small application designed to parse the log output of the Postfix SMTP server (usually /var/log/mail.log ), and convert it into...
Read more >postconf - man pages section 1: User Commands
With -M, edit the master.cf configuration file, and replace one or more service entries with new values as specified with "ser- ...
Read more >Advanced master.cf query/update support - Google Groups
I recently picked up work on the postconf command that I suspended in January this year. It's probably best to just give a...
Read more >jc.parsers.postconf - GitHub Pages
jc - JSON Convert postconf -M command output parser. Usage (cli): ... import jc result = jc.parse('postconf', postconf_command_output). Schema:
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is now available in v1.20.1 available on PIP. (binaries and packages will be available soon)
Hi @chriscroome - yeah this looks pretty easy to parse. I’m working on releasing v1.20.0 right now, but this could make it into the next release.