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/ file and comment below line to allow receiving an email from anywhere. To comment a line in, just put dnl keyword at the start of the line.

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

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

cat /etc/mail/local-host-names

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/ > /etc/mail/

Restart Sendmail service

sudo systemctl restart sendmail

Your system is ready for incoming emails.