control 'sasl_auth_multiple' do describe file '/etc/postfix/sasl_passwd' do its('content') do should cmp <<~EOF # Auto-generated by Chef. # Local modifications will be overwritten. relayhost1 kitchenuser:not-a-real-thing relayhost2 anotherkitchenuser:yet-not-a-real-thing 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