Michael Tokarev via Postfix-users:
> Hi!
>
> After some experiments with postconf -F yesterday I noticed an
> interesting outcome of it. I'm editing diff a bit, to omit the
> unimportant details.
>
> # cp -p master.cf master.cf.sav
> # postconf -F '*/*/chroot=n'
> # diff -u master.cf master.cf.sav
>
> --- master.c
> +++ master.cf.sav
> @@ -12,6 +12,7 @@
> #smtp inet n - y - 1 postscreen
> #smtpd pass - - y - - smtpd
> #dnsblog unix - - y - 0 dnsblog
> +dnsblog unix - - y - 0 dnsblog1
> #tlsproxy unix - - y - 0 tlsproxy
> # Choose one: enable submission for loopback clients only, or for any
> client.
> #127.0.0.1:submission inet n - y - - smtpd
> @@ -51,11 +52,10 @@
> # -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
> # -o milter_macro_daemon_name=ORIGINATING
> #628 inet n - y - - qmqpd
> -dnsblog unix - - n - 0 dnsblog1
> smtp inet n - n - - smtpd
> pickup unix n - n 6000 1 pickup
> ....
> @@ -64,9 +64,9 @@
> trace unix - - n - 0 bounce
> verify unix - - n - 1 verify
> flush unix n - n 1000? 0 flush
> proxymap unix - - n - - proxymap
> +proxywrite unix - - n - 1 proxymap
> # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
> -proxywrite unix - - n - 1 proxymap
> smtp unix - - n - - smtp
> relay unix - - n - - smtp
> -o
> syslog_name=${multi_instance_name?{$multi_instance_name}:{postfix}}/$service_name
> ...
> anvil unix - - n - 1 anvil
> scache unix - - n - 1 scache
> +postlog unix-dgram n - n - 1 postlogd
> #
> # ====================================================================
> # Interfaces to non-Postfix software. Be sure to examine the manual
> @@ -140,4 +141,3 @@
> # 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}
> -postlog unix-dgram n - n - 1 postlogd
>
> It looks like postconf sometimes exchanges a line and a comment near
> it. In all cases in this example, a line after comment has been
> moved right before the comment block.
>
> Apparently the commented-out smtp_helo_timeout=5.. line initially has been
> after the relay... block, but somehow ended before the smtp/unix - and the
> only manipulations I did to this master.cf was to experiment with postconf -F,
> not touching it manually - so it must be the prior postconf -F which moved
> this comment, so comments can be moved both backwards and forward.
>
> Something does not seem to be working as intended.
If you want the postconf 'edit' commands to preserve the location
of comments before, after, or in the middle of a main.cf or master.cf
entry, then I wish you good luck with that. Be sure to add a bunch
of automated tests to verify that the code works, and that it is
not broken after someone makes a code change.
I'm still working on your previous complaint about non-encoded full
names. Implementing the raw functionality is one thing, but a "clean"
integration into a maintainable system can be a much larger effort.
Work on Postfix is a constant reminder of figure 1.1 in Fred Brook's
book the mythical man-month.
https://www.researchgate.net/figure/Costs-of-generalizing-programming-Figure-from-Figure-11-of-Fred-Brooks-The-Mythical_fig5_314237466
Wietse
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]