Verification: a143cc29221c9be0

Php admin value sendmail path

1. Remove Postfix

Postfix is the default SMTP service pre-installed on Ubuntu operating systems. And you are willing to use Sendmail server on your system.

First of all, remove the existing postfix installation on Ubuntu.

sudo systemctl stop postfix
sudo apt remove postfix && apt purge postfix

2. Install Sendmail

If you don’t have installed Sendmail using the following command to install Sendmail with other required packages using yum package manager.

sudo apt install sendmail

3. Configure Sendmail Server

The execute the sendmailconfig command to complete the basic configuration.

sudo sendmailconfig

Select all options to ‘Y’ and press enter. Wait for the command finish.

Your server is ready for sending emails. You can use the Linux command line or PHP script to send emails.

4. Receive Incomming Emails

Edit /etc/mail/sendmail.mc file and comment below line to allow receiving an email from anywhere. To comment a line in sendmail.mc, just put dnl keyword at the start of the line.

dnl DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl
dnl DAEMON_OPTIONS(`Family=inet,  Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')dnl

Then add your domain names to /etc/mail/local-host-names file.

cat /etc/mail/local-host-names

tecadmin.net
mail.tecadmin.net
localhost
localhost.localdomain

Now use m4 is a macro processor to compile the Sendmail configuration files. m4 is stream-based, that is, it doesn’t understand about lines.

sudo m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

Restart Sendmail service

sudo systemctl restart sendmail

Your system is ready for incoming emails.