On 2/8/19 1:44 PM, Wietse Venema wrote:
Viktor Dukhovni:
pickup         unix   n             -             n             60           1  
           pickup
pickup         unix   n             -             n             60           1  
           pickup
         -o content_filter=
The "pickup" service is defined twice in master.c, the second
instance (last one wins) disables content filtering for mail submitted
locally via sendmail(1).
That was easy enough to fix:

When I was working on this 2 years ago, I thought it was kind of cool that instead of editing master.cf entries to fix them, I could just append a whole new entry with the 'right' content.

Much easier to automate changes (as we had nothing like postconf -e for changing master.cf).  If I read the patch right, you are providing a warning of the double entry.  Perhaps a better patch would warn and drop all but the last entry?



Feb  8 13:42:53 spike postfix/master[53597]: warning: duplicate master.cf entry for 
service "pickup" (public/pickup)-- using the last entry

--- ./src/master/master_conf.c- 2019-02-08 13:39:50.000000000 -0500
+++ ./src/master/master_conf.c  2019-02-08 13:36:28.000000000 -0500
@@ -117,6 +117,14 @@
        }
/*
+        * Warn about duplicate entry.
+        */
+       else if ((serv->flags & MASTER_FLAG_MARK) == 0) {
+           msg_warn("duplicate master.cf entry for service \"%s\" (%s)"
+                    "-- using the last entry", serv->ext_name, serv->name);
+       }
+
+       /*
         * Update an existing service entry. Make the current generation of
         * child processes commit suicide whenever it is convenient. The next
         * generation of child processes will run with the new configuration


Reply via email to