Bobcares

How to Install MSMTP

by | Apr 28, 2022

Install msmtp like a pro with this handy guide by our team of experts. Read on to learn more. 

At Bobcares, we offer solutions for every query, big and small, as a part of our Server Management Services.

Let’s take a look at how our Support Team is ready to help customers install msmtp.

How to install msmtp

msmtp is an SMTP client that helps send mails from Mutt and other mail user agents. It transmits mails to an SMTP server, which in turn takes care of further delivery. Furthermore, we can easily configure it and put it to use with different SMTP servers via different profiles. In fact, this feature makes it ideal for mobile clients. Additionally, GSASL and TLS/SSL support are included in this package.

 

install msmtp

Today, our Server Management Support Techs are going to take us through the installation process of msmtp. But first, we’ll update our server to the most recent version. In case we are installing msmtp and Mutt on an existing server, we have to ensure we can update your server to the newest release.

$ sudo apt-get update
$ sudo apt-get upgrade

After that, we will start msmtp installation with the following command:

$ sudo apt-get -y install msmtp

Now, we require a file that consists of the CA certificates. This will allows us to connect via SSL/TLS to the email server. We can run the following command to verify if our server already has a ca-certificates package or not:

$ dpkg -l | grep ca-certificates

If a ca-certificate package is not installed, the above command will return a blank output. In this scenario, we can go ahead with ca-certificates package installation with the following command:

$ sudo apt-get -y install ca-certificates

How to configure msmtp

The next step in installing msmtp involves configuring msmtp. To begin with, we have to create an msmtp configuration file at /etc/msmtprc location. Then add the following content to this file:

defaults
auth           on
tls            on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile        ~/.msmtp.log# Gmail
account        gmail
host           smtp.gmail.com
port           587
from           @gmail.com
user           @gmail.com
password# Gmail
account        provider2
host           smtp.provider2.net
port           587
from           @provider2.net
user           @provider2.net
password# Set a default account
account default : gmail

In the above example, we have used a Gmail account. We can set any account as the default as per our preference.

After saving the configuration file, it is time to test the email configuration with the following command:

echo "Message" | mail -s "Title" bobcares@gmail.com

If successful, we will receive an email from our newly configured account.

[Need assistance with another query? We are available 24/7.]

Conclusion

In a nutshell, our skilled Server Management Support Team at Bobcares demonstrated how to install msmtp.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF