control 'sasl_auth_none' do describe file '/etc/postfix/sasl_passwd' do its('content') do should cmp <<~EOF # Auto-generated by Chef. # Local modifications will be overwritten. smtp_sasl_passwd : smtp_sasl_user_name : EOF end end db_type = ((os.family == 'redhat' && os.release.to_i >= 10) || (os.family == 'suse' && os.release.to_i >= 15)) ? 'lmdb' : 'hash' describe postfix_conf '/etc/postfix/main.cf' do its('smtp_sasl_password_maps') { should eq "#{db_type}:/etc/postfix/sasl_passwd" } end end