Monday, July 19, 2021
Sendmail is the most common Linux mail service, it is lightweight and is used in administrative tasks as well as sending mail. In this post we are going to install and configure Sendmail and go over how to use it. Sendmail is the mechanism to send mail, it's not the mail server itself.
First let's install the Sendmail service, type dnf install sendmail -y after sendmail is installed you can install another package which will configure sendmail for you, type dnf install sendmail-cf -y to install that package
One it is installed you need to define your smtp relay server in the file /etc/mail/sendmail.mc file in the line that says dnl define(`SMART_HOST', `smtp.your.provider')dnl this is the one service that you need to have some infrastructure in place before you can use it. Remember to remove the dnl when you specify the smtp server because dnl means comment in the sendmail.mc file.
Once you have your smtp relay server defined, you can start the sendmail service with the systemctl restart sendmail command
No comments:
Post a Comment