DevHeads.net

Testing Postfix-3.3....0-RC1

Hi,

so far, the RC1 works. There is only one thing that is bad:

Start and stop do not like directories inside /etc/postfix*

rns root@mx ~ # postfix start
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix-submission/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
postfix/postfix-script: starting the Postfix mail system
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
postfix/postfix-script: starting the Postfix mail system
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix-submission/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix-submission/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix-submission/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix-submission/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix-submission/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix-submission/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix-submission/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix-submission/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix-submission/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix-submission/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix-submission/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix-submission/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix-submission/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix-submission/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix-submission/ldap": Is a directory
/usr/sbin/postconf: warning: read "ldap" configuration "/etc/postfix/ldap": Is a directory
postfix/postfix-script: starting the Postfix mail system
How can I stop these nasty messages? I have a very clean file structure and this is totally ok, so Postfix should not show these messages.

Thanks

Christian

Comments

Re: Testing Postfix-3.3....0-RC1

By Wietse Venema at 02/13/2018 - 08:03

Christian Ro??ner:
What are the main.cf settings?

What is /etc/postfix-submission/ldap?

Wietse

Re: Testing Postfix-3.3....0-RC1

By Wietse Venema at 02/17/2018 - 13:01

# postfix stop
I'm closing this bug, so that I can unblock the Postfix 3.3 release.

The reporter has not provided configuration details for reproducing this.
Based on a reverse code analysis starting with the warning message, I
can only reproduce the warning message when main.cf or master.cf contain,
after $name expansion, a parameter value of the form:

... maptype:/etc/postfix/ldap ...
... word:{... maptype:/etc/postfix/ldap ...} ...
... word:{... word:{... maptype:/etc/postfix/ldap ...} ...} ...

and so on, recursively, where 'maptype' is a Postfix database type that
uses a configuration file (examples: ldap, memcache, *sql) perhaps with
a prefix of 'proxy:', and 'word' is a sequence that does not contain
comma or whitespace.

Wietse

Re: Testing Postfix-3.3....0-RC1

By Wietse Venema at 02/17/2018 - 19:48

Wietse Venema:
To be precise, a parameter value with one of the following forms:

To find the culprit in main.cf:

postconf -xn | grep /etc/postfix/ldap

Ditto for master.cf:

postconf -xM | grep /etc/postfix/ldap

The '-x' expands any $name instances.

Wietse

Re: Testing Postfix-3.3....0-RC1

By =?iso-8859-1?Q?... at 02/18/2018 - 07:41

Hi,

sorry for the delay. I gave a party at Friday and I did not find the time to anser faster.

It is post-multi over three instances. Is ort LDAP config files and maps uner sub directories in /etc/postfix* to have a clear file structure and easy permissions (750, root:postfix for example)

This worked for decades.

Christian

Re: Testing Postfix-3.3....0-RC1

By Wietse Venema at 02/18/2018 - 09:04

Christian Ro??ner:
I copied those settings to my main.cf file, and as expected, no
warning messages.

What about the other postconf command in my response?

Wietse

Re: Testing Postfix-3.3....0-RC1

By =?iso-8859-1?Q?... at 02/18/2018 - 13:32

It seems the output of postconf does not reflect the real main.cf, as it normalizes things. I defined macros at the top:

# Global variables
default_database_type = lmdb
map = ${config_directory}/maps
mapidx = ${default_database_type}:${map}
ldap = proxy:ldap:${config_directory}/ldap

And I use them like:

proxy_read_maps =
proxy:unix:passwd.byname,
${virtual_alias_maps},
${ldap}/relay_domains_and_helo_access.cf,
${ldap}/relay_recipient_maps.cf,
${ldap}/add_header.cf,
${ldap}/transport.cf

relay_domains =
lists.${mydomain},
${ldap}/relay_domains_and_helo_access.cf

All other command syou asked me for do not print anything that has been shown with my latest reply.

If you need more details, I will send you my full config gzipped and offlist.

Christian

Re: Testing Postfix-3.3....0-RC1

By John Fawcett at 02/18/2018 - 09:26

On 18/02/18 14:04, Wietse Venema wrote:
Not sure if it helps, but with this configuration in /etc/postfix/main.cf

ldap = proxy:ldap:/etc/postfix/ldap when I run postconf it gives me a warning that
depends on whether that directory exists or not either postconf:
warning: open "ldap" configuration "/etc/postfix/ldap": No such file or
directory or postconf: warning: read "ldap" configuration
"/etc/postfix/ldap": Is a directory that's on 3.3-20171229 John

Re: Testing Postfix-3.3....0-RC1

By Viktor Dukhovni at 02/18/2018 - 13:55

I see the same:

$ ls -ld /var/tmp/postfix/etc/ldap{,/foo.cf}
drwxr-xr-x 3 root wheel 96 Feb 18 12:44 ldap
-rw-r--r-- 1 root wheel 24 Feb 18 12:43 ldap/foo.cf

$ postconf -n
postconf: warning: read "ldap" configuration "/var/tmp/postfix/etc/ldap": Is a directory
foo = proxy:ldap:${config_directory}/ldap
proxy_read_maps = ${foo}/foo.cf

$ postconf -d mail_version
mail_version = 3.3-20171028

And likewise with:

$ postconf -n
postconf: warning: read "ldap" configuration "/var/tmp/postfix/etc/": Is a directory
ldap = proxy:ldap:${config_directory}/
proxy_read_maps = ${ldap}foo.cf

Looks like validating LDAP/MySQL/PgSQL table definitions requires more care in
detecting which parameters actually use the RHS as a table, and which are "macros"
for building table definitions.

Re: Testing Postfix-3.3....0-RC1

By Wietse Venema at 02/18/2018 - 14:12

Viktor Dukhovni:
Finally. This means that the checker should skip user-defined
parameters, and only inspect parameters defined by Postfix itself;

- Postfix built-in parameters,

- Postfix-generated parameters with names that depend on a master.cf
service name,

- Postfix-generated parameters with names that depend in a database
name prefix.

That will probably not happen today as I have to review conference
papers first.

Wietse

Re: Testing Postfix-3.3....0-RC1

By Wietse Venema at 02/18/2018 - 22:09

Wietse Venema:
Fixed by adding a guard that makes postconf look for database names
only in built-in and service-defined parameters (parameters whose
name depends on the name of a master.cf entry). I'll roll out a
Postfix 3.3.0 release candidate on Monday.

Wietse

Re: Testing Postfix-3.3....0-RC1

By Wietse Venema at 02/19/2018 - 12:36

Wietse Venema:
Done. This release candidate also adds 22 missing parameter names
to the proxy_read_maps setting (plus the script that generated those
entries).

Wietse

Re: Testing Postfix-3.3....0-RC1

By Viktor Dukhovni at 02/19/2018 - 14:18

With so many values in the default setting of proxy_read_maps, and
given that many users need to add additional tables to the list,
perhaps this is a good time to introduce a "default_proxy_read_maps"
parameter:

default_proxy_read_maps = ... release-dependent-compile-time-list
proxy_read_maps = ${default_proxy_read_maps}

That way, a user can just set:

proxy_read_maps = ${default_proxy_read_maps} ... user-specified ...

Do you agree?

Re: Testing Postfix-3.3....0-RC1

By Wietse Venema at 02/19/2018 - 14:34

Viktor Dukhovni:
Couple things.

Assuming that we have no new features in a stable release candidate.

If we do this for proxy_read_maps, then why not for other parameters,
too? How would we justify why some parameter has this and some other
parameter does not? I'd like to avoid new WTF user experiences.

Should all Postfix settings have an automatic default pseudo-parameter,
so that we can avoid WTFs? If so, what would the magic prefix be? We
already have 23 real "default_..." parameters, so that may not be
a good choice.

Should we introduce support for "name = $name ..." or "name += ..."?
(Probaly not, because it complicates editing main/master.cf with the
postconf command).

Wietse

Re: Testing Postfix-3.3....0-RC1

By Viktor Dukhovni at 02/19/2018 - 14:48

Yes, this could be useful in more cases, though "proxy_read_maps"
is singularly compelling.

This could make sense.

It would perhaps make sense to go with "builtin_" rather than "default_",
given all the "default_" prefixes for transport-neutral values, which are
not the same sort of beast.

Agreed.

I'd go with "name += " if it were feasible, but having the defaults
explicitly accessible does look easier to work with, given machine-
editing...

Re: Testing Postfix-3.3....0-RC1

By Wietse Venema at 02/19/2018 - 15:56

Viktor Dukhovni:
I prefer this (the systematic approach) over special cases any time.

"builtin_" sounds good to me.

Good. No "+=" means no worries about people expecting "-=" support.
That would be a worse headache.

Wietse

Re: Testing Postfix-3.3....0-RC1

By John Fawcett at 02/18/2018 - 10:13

On 18/02/18 14:26, John Fawcett wrote:
looks like the source code that produces the error message is in
postconf/postconf_dbms.c

        dict_load_fp(dict_spec, fp);
        if (vstream_fclose(fp)) {
            msg_warn("read \"%s\" configuration \"%s\": %m",
                     dp->db_type, cf_file);
            myfree(dict_spec);
            return;
        }