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.
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.
0 Comments