def make_msmtp_config config accounts = config['accounts'].map do |account| <<~END.chomp # BEGIN profile generated by mmm account #{account['name']} host #{account['smtp']} port 587 from #{account['email']} user #{account['email']} passwordeval "pass show #{account['pass_tag'] || account['name']}" # END profile generated by mmm END end accounts.join "\n\n" end def msmtprc_preamble <<~END defaults auth on tls on tls_trust_file /etc/ssl/certs/ca-certificates.crt logfile ~/.msmtp.log END end