Re: Setup for sending mail via Mutt
Julia Lawall <[email protected]> Tue, 1 Apr 2025 16:47:13 +0200 (CEST)
| Newsgroups | dev.linux.lists.outreachy |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 1 Apr 2025, Samuel Abraham wrote: > On Tue, Apr 1, 2025 at 2:11 PM Richard Akintola > <[email protected]> wrote: > > > > The following assumes that you have installed Esmtp or Exim4 (default on Debian) > > and you have generated password using App Password (for Gmail) > > > > Configure Esmtp > > 1. Added the following to ~/.esmtp file > > identity "[email protected]" > > hostname smtp.gmail.com:587 > > username "[email protected]" > > password "passwordGeneratedByAppPassword" > > starttls required > > > > 2. Make sendmail point to esmtp using the command > > sudo update-alternatives --install /usr/sbin/sendmail sendmail /usr/bin/esmtp 50 > > > > 3. Test if esmtp can send mails > > echo "Testing email via esmtp" | /usr/sbin/sendmail -v [email protected] > > > > 4. Add the following to ~/.muttrc file > > set sendmail="/usr/bin/esmtp" > > set envelope_from=yes > > set from="My Name <[email protected]>" > > set use_from=yes > > set edit_headers=yes > > > > 5. Setup Done > > Hello Richard > > I have an observation. > The initial challenge the person faced was that he could not send > patches with mutt via Gmail. > But there is a link in the <Set up email> section of the firstPatch > documentations that shows how to send > patches using mutt via Gmail using IMAP. > <approved email client> > https://www.kernel.org/doc/html/latest/process/email-clients.html > The MUTT(TUI) section shows the complete configuration that allows > mutt to be used to send mails > using Gmail as a MTA and SMTP server, via IMAP, without the need for > esmpt. This is what I used to set up and it allows > me to see the mails I sent via MUTT in the Sent Box of my Gmail account. > I think the update that should be done in the documentation is to > remove first paragraph > of the <Gmail setUp> section that talks about enabling IMAP and > Forwarding POP/IMAP > since according to the settings page on Gmail, IMAP and Forwarding > POP/IMAP are enabled > automatically starting. January 2025, so no need to enable anything. > > I think the above link should be inputted in the second paragraph of > the <Gmail setup> > after the two-factor authentication and the App password have been > generated since the Mutt > configuration needs them and so that no one can easily miss the link > since the link is hidden in the > <approved email client> text. > > You can wait to hear more from Julia. Not me. You all are the experts :) Please conclude and then I will update the web page. Thanks for your help! julia > > Adekunle. > > > > > > Configure Exim4 (default mail transfer agent - MTA on Debian) > > 1. Make sendmail point to exim4 using the command > > sudo update-alternatives --install /usr/sbin/sendmail sendmail /usr/sbin/exim4 100 > > > > 2. Run the command below to add gmail and password to exim4 in the format below > > sudo vi /etc/exim4/passwd.client > > > > smtp.gmail.com:[email protected]:passwordGeneratedByAppPassword > > > > 3. Add the following configuration to update-exim4.conf.conf via sudo > > e.g sudo vi /etc/exim4/update-exim4.conf.conf > > > > dc_eximconfig_configtype='smarthost' > > dc_other_hostnames='' > > dc_local_interfaces='127.0.0.1; ::1' > > dc_readhost='' > > dc_relay_domains='' > > dc_minimaldns='false' > > dc_relay_nets='' > > dc_smarthost='smtp.gmail.com::587' > > CFILEMODE='644' > > dc_use_split_config='false' > > dc_hide_mailname='true' > > dc_mailname_in_oh='true' > > dc_localdelivery='mail_spool' > > > > 3. Test if Exim4 can send mails > > echo "Testing email via Exim4" | /usr/sbin/sendmail -v [email protected] > > > > 4. Add the following to ~/.muttrc > > set sendmail="/usr/sbin/exim4" > > set use_from=yes > > set realname="Your Name" > > set from="[email protected]" > > set envelope_from=yes > > > > 5. Setup Done. > > >