public inbox for outreachy@lists.linux.dev
 help / color / mirror / Atom feed
* Setup for sending mail via Mutt
@ 2025-04-01 13:11 Richard Akintola
  2025-04-01 14:38 ` Samuel Abraham
  2025-04-15  9:11 ` Richard Akintola
  0 siblings, 2 replies; 10+ messages in thread
From: Richard Akintola @ 2025-04-01 13:11 UTC (permalink / raw)
  To: outreachy; +Cc: julia.lawall, princerichard17a

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 "my.email@gmail.com"
hostname smtp.gmail.com:587
username "my.email@gmail.com"
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 recipient@gmail.com

4. Add the following to ~/.muttrc file
set sendmail="/usr/bin/esmtp"
set envelope_from=yes
set from="My Name <my.email@gmail.com>"
set use_from=yes
set edit_headers=yes

5. Setup Done


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:my.email@gmail.com: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 recipient@gmail.com

4. Add the following to ~/.muttrc
set sendmail="/usr/sbin/exim4"
set use_from=yes
set realname="Your Name"
set from="my.email@gmail.com"
set envelope_from=yes

5. Setup Done.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-04-15 10:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-01 13:11 Setup for sending mail via Mutt Richard Akintola
2025-04-01 14:38 ` Samuel Abraham
2025-04-01 14:47   ` Julia Lawall
     [not found]   ` <CAMyr_b+jCO2k+VbAB=Ahv9=Xi8adSUF3SM7UrO8FLa5JSfro6A@mail.gmail.com>
2025-04-01 16:16     ` Samuel Abraham
2025-04-15  9:00       ` Richard Akintola
2025-04-15  9:04         ` Julia Lawall
2025-04-15  9:47           ` Richard Akintola
2025-04-15  9:11 ` Richard Akintola
2025-04-15  9:17   ` Julia Lawall
2025-04-15 10:24     ` Richard Akintola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox