

You can also check systemd journal to see if the e-mail was sent successfully: ~]# journalctl -f -u sendmail I am using -v parameter for increased verbosity (to see the whole communication with SMTP relay server). Send the test e-mail using sendmail command: ~]# sendmail -v < /tmp/mail.txt


Generate the authentication database, based on authinfo text file (this will overwrite existing /etc/mail/authinfo.db file): ~]# cd mail]# makemap hash authinfo ~]# echo "This is the example e-mail body" > /tmp/mail.txt Generate authentication information for SMTP relayĬreate authinfo text file containing SMTP relay authentication info: ~]# touch /etc/mail/authinfoĮdit the file, provide SMTP Relay FQDN and authentication credencials: AuthInfo: "U:root" "P:XXXXXXXXX" "M:LOGIN PLAIN" Note: If you don’t have cyrus-sasl-plain package installed and your SMTP relay host requires authentication, you might encounter the following error in sendmail log: Jan 05 00:37:07 chronos sendmail: 004NXT6g000357: AUTH=client, available mechanisms do not fulfill requirementsĢ. ~]# dnf install sendmail sendmail-cf cyrus-sasl-plain – cyrus-sasl-plain package contains the Cyrus SASL plugins which support PLAIN and LOGIN authentication. – sendmail-cf package includes configuration files required to generate sendmail.cf configuration file. Install sendmail and corresponding RPM packages: ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 Include your hostname in /etc/hosts file: ~]# cat /etc/hostsġ27.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 chronos Set hostname for your host (if not already set): ~]# hostnamectl set-hostname chronos Sendmail daemon requires configured hostname for proper operation.

In this article I present how to install and configure Sendmail on CentOS 8 to work as SMTP Relay for outbound traffic to OVH mail server. It can play a significant role as a background mechanism for processing outbound emails from monitoring software to deliver status notifications to the system administrators or send diagnostic information at specified time schedule. Sendmail is an easy to implemant, lightweight electronic Mail Transport Agent (MTA), which enables you to automate the process of sending e-mail messages from your Linux host.
