Greetings, Viktor Dukhovni! >> >> But in cases where remote sites do not have published key material, the >> fallback is may with dane, which is a step back in terms of security and >> not wanted. >> >> How can we specify: >> >> 1, Always use at least encrypt >> 2, When TLSA-records are found and valid, use only this to encrypt >> 3, When no TLSA-records are found or the ones found can not be used, fall >> back to encrypt, if not possible, fail.
> That requires new code. Sorry about that. The issue is in part > whether a point-fix would be appropriate with a fallback level > when DANE TLSA records are not found, or whether a more general > mechanism should be implemented that can specify more complex > policy: A more general solution would be preferred, and will likely be more future-proof. > * dane or else encrypt or else fail > * dane or else verify [match=...] or else fail > * dane or warn and delivery anyway > * ... > In Postfix, when we do something, we tend to skip half measures > and do it "right", i.e. in a general way. So the question is > whether "DANE or else encrypt" is the right design or not. Not necessarily. Practice of allowed downgrades had shown a bad track record numerous times. > One can certainly imagine specifying a "minimum" security > level, and then fallback would never use anything weaker. *_tls_security_level is working very close to desirable level already. If it could be changed into a list, the configuration logic would be rather simple. If only one value is set, use that or stronger level. Which one to start from could be a compilation setting. If a list of values is set, try only them in order from strongest to weakest, fail if nothing match. F.e. the default compiled-in order list could be "dane encrypt none", abbreviated as "may" in configuration. When some "new" mechanism is developed into postfix, the list remains unchanged for initial iterations, but for those interested it could be enabled with "smtp_tls_security_level=new,may" or may be "smtp_tls_security_level=new,encrypt". One last issue is if you for some reason want to specify only one level and never upgrade... but I'm not sure it worth the hassle, with the exception of "none". -- With best regards, Andrey Repin Sunday, February 17, 2019 21:15:16 Sorry for my terrible english...
