Re: I am unable to setup and send mail via mutt Here I am sharing my all muttrc and everything

Richard Akintola <[email protected]> Sun, 30 Mar 2025 15:22:56 +0100
Newsgroups dev.linux.lists.outreachy
Message-ID <CAMyr_bJoBj1aHpM9Xcun3i33UCtd+X_2492WzKCtufYTgJOYaQ@mail.gmail.com>
Yes, and we also need to help ensure that esmtp or any other Message
Transfer Agent (MTA) is configured properly (exim4 is the default MTA
on Debian).

On Sun, Mar 30, 2025 at 3:10 PM Julia Lawall <[email protected]> wrote:
>
>
>
> On Sun, 30 Mar 2025, Richard Akintola wrote:
>
> > Hi,
> >
> > Here is how I solved it.
> > After installing esmtp, I followed the steps below to configure it:
> > 1. Enabled two-step verification in order to generate App Password.
> >
> > 2. Added the following to my ~/.esmtp file
> > identity "[email protected]"
> > hostname smtp.gmail.com:587
> > username "[email protected]"
> > password "passwordGeneratedByAppPassword"
> > starttls required
> >
> > 3. sudo update-alternatives --install /usr/sbin/sendmail sendmail
> > /usr/bin/esmtp 50
> > This handles the sendmail
> >
> > 4. Test if esmtp can send mails
> > echo "Testing email via esmtp" | /usr/sbin/sendmail -v [email protected]
> >
> > 5. Step 4 was successful, so I added the following to my ~/.muttrc
> > set sendmail="/usr/bin/esmtp"
> > set envelope_from=yes
> > set from="My Name <[email protected]>"
> > set use_from=yes
> > set edit_headers=yes
> >
> > I hope this helps.
>
> Should we update the Gmail instructions in the first patch tutorial in
> some way?
>
> julia
>
>
>
> >
> > On Sun, Mar 30, 2025 at 2:38 PM Julia Lawall <[email protected]> wrote:
> > >
> > >
> > >
> > > On Sun, 30 Mar 2025, rujra wrote:
> > >
> > > >
> > > > hi Julia,
> > > > Yes I have checked this solution:
> > > > < have solved it by heading Google's less secure apps page. And turn on the less secure apps. Now I can send mail through mutt application.>
> > > >
> > > > but my gmail account is not authorized to do that changes. as it suggest
> > >
> > > I don't actually have a gmail account.  Has someone else solved the
> > > problem?  If I click on that link it tells me about something that has
> > > changed since January 2025:
> > >
> > > Starting January 2025, less secure apps, third-party apps, or devices that
> > > have you sign in with only your username and password will no longer be
> > > supported for Google Workspace accounts. For exact dates, visit Google
> > > Workspace Updates. To continue to use a specific app with your Google
> > > Account, you’ll need to use a more secure type of access that doesn’t
> > > share password data. Learn how to use Sign in with Google.
> > >
> > > But I don't know if that is relevant to your case.
> > >
> > > Have you followed these instructions from the Outreachy tutorial?
> > >
> > > ------------------------
> > >
> > > In gmail, go click the gear icon, go to "Settings", go to the tab
> > > "Forwarding POP/IMAP", and click "Enable IMAP", then click on "Save
> > > Changes".
> > >
> > > Then click the "Configuration instructions" link at the very bottom of the
> > > page. Note the outgoing mail server information in "Step 2", and copy it
> > > into the .esmtprc file, as shown in the next section.
> > >
> > > Next, make sure two-step verification is enabled on your gmail account,
> > > then generate and use App Password.
> > >
> > > ------------------------
> > >
> > > julia
> > >
> > >
> > >
> > >
> > > >
> > > >
> > > > On Sun, 30 Mar 2025, 6:53 pm Julia Lawall, <[email protected]> wrote:
> > > >
> > > >
> > > >       On Sun, 30 Mar 2025, rujra wrote:
> > > >
> > > >       > Hi Julia,Here I am unable to send message from my CLI :
> > > >       > Error: "Error sending message, child exited 70 (Internal error.)"
> > > >       > I am asking that , here when I am trying to send via CLI using mutt , I am unable to send it and says error as above.
> > > >       > is this related to my sendmail path ? = <set sendmail="/usr/bin/esmtp"> ?
> > > >       > kindly help , and thank you for your prompt response/help.
> > > >
> > > >       Did you try the suggestion at the end of the page here:
> > > >
> > > >       https://stackoverflow.com/questions/38372023/ubuntu-sendmail-exited-with-error-70
> > > >
> > > >       I added back the mailing list because others may have this question in the
> > > >       future, or know the answer to it now.
> > > >
> > > >       julia
> > > >
> > > >
> > > >       > Thanking you,
> > > >       > Rujra Bhatt
> > > >       >
> > > >       > On Sun, Mar 30, 2025 at 6:33 PM Julia Lawall <[email protected]> wrote:
> > > >       >
> > > >       >
> > > >       >       On Sun, 30 Mar 2025, rujra wrote:
> > > >       >
> > > >       >       > ============ ~/.muttrc ================
> > > >       >       > set sendmail="/usr/bin/esmtp"
> > > >       >       >   2 set envelope_from=yes
> > > >       >       >   3 set from="Rujra Bhatt <[email protected]>"
> > > >       >       >   4 set use_from=yes
> > > >       >       >   5 set edit_headers=yes
> > > >       >       >   6
> > > >       >       >   7 set imap_user = '[email protected]'
> > > >       >       >   8 set imap_pass = 'mfpdcwklatrzlhbu'   #application password 16-digit.
> > > >       >       >   9
> > > >       >       >  10
> > > >       >       >  11 set folder="imaps://imap.gmail.com"
> > > >       >       >  12 set spoolfile="imaps://imap.gmail.com/INBOX"
> > > >       >       >  13 set record="imaps://imap.gmail.com/[Gmail]/Sent Mail"
> > > >       >       >  14 set postponed="imaps://imap.gmail.com/[Gmail]/Drafts"
> > > >       >       >  15
> > > >       >       >  16 set header_cache = "~/.mutt/cache/headers"
> > > >       >       >  17 set message_cachedir = "~/.mutt/cache/bodies"
> > > >       >       >  18 set certificate_file = "~/.mutt/certificates"
> > > >       >       >  19
> > > >       >       >  20 set from = '[email protected]'
> > > >       >       >  21 set realname = 'rujra bhatt'
> > > >       >       >  22
> > > >       >       >  23 #set smtp_url = 'smtp://[email protected]:587/'
> > > >       >       >  24 #set smtp_pass='aplication'
> > > >       >       >  25
> > > >       >       >  26 set move = no
> > > >       >       >  27 set imap_keepalive = 900
> > > >       >       >  28
> > > >       >       >  29 # Gmail-style keyboard shortcuts
> > > >       >       >  30 macro index,pager ga "<change-folder>=[Gmail]/All<tab><enter>" "Go
> > > >       >       > to all mail"
> > > >       >       >  31 macro index,pager gi "<change-folder>=INBOX<enter>" "Go to inbox"
> > > >       >       >  32 macro index,pager gs "<change-folder>=[Gmail]/Starred<enter>" "Go
> > > >       >       > to starred messages"
> > > >       >       >  33 macro index,pager gd "<change-folder>=[Gmail]/Drafts<enter>" "Go to drafts"
> > > >       >       >  34 macro index,pager e "<enter-command>unset trash\n
> > > >       >       > <delete-message>" "Gmail archive message    " # different from Gmail,
> > > >       >       > but wanted to keep "y" to show folders.
> > > >       >       >
> > > >       >       >
> > > >       >       > =========================================================
> > > >       >       > Also I am attaching debug report here
> > > >       >
> > > >       >       How does the error manifest?  i didn't see anything alarming in the debug
> > > >       >       output, but I may have missed something.
> > > >       >
> > > >       >       julia
> > > >       >
> > > >       >
> > > >       >
> > > >
> > > >
> > > >
> >