This should help you get Sendmail installed with basic configuration on Ubuntu.
- If sendmail isn't installed, install it:
sudo apt-get install sendmail
- Configure
/etc/hosts
file:nano /etc/hosts
- Make sure the line looks like this:
127.0.0.1 localhost yourhostname
- Run Sendmail's config and answer 'Y' to everything:
sudo sendmailconfig
- Restart apache
sudo service apache2 restart
HI,
I run the below commands on my Ubuntu 18.04 to configure the sendemail/sendmail, I am getting email success message but never received an email. Help will appreciate. Thanks.
Apr 16 15:45:01 ubuntu sendemail[29360]: Email was sent successfully!
systemctl stop postfix
sudo apt remove postfix
sudo apt purge postfix
sudo apt-get install mailutils
sudo apt-get install sendmail sendemai