How to install sendmail server in Ubuntu 15.04

Share Button

Install SendMail/ Send-only Mail Server on Ubuntu 15.04

We are going to use Exim as our send mail server. Use the following commands to update your package repositories, upgrade your system, and install Exim:

apt-get update
apt-get upgrade
apt-get install exim4-daemon-light mailutil

Now Configure the Exim for Local Mail Service

Now we’re ready to configure Exim for local mail service. Follow these steps for the same:

  • Enter the following command to start Exim configuration:
  • dpkg-reconfigure exim4-config



  • You’ll be presented with a welcome screen, followed by a screen asking what type mail delivery you’d like to support. Select the option for internet site, and then select Ok to continue.  1


  • Enter your system’s FQDN (fully qualified domain name) in the mail name configuration screen.  2


  • Enter ; ::1 when asked which IP address to listen on for SMTP connections.  3.


  • Make sure you list your FQDN, hostname, and localhost entries when you’re asked which destinations mail should be accepted for.  4


  • Leave the relay domains and relay machines fields blank.   6


  • Select No when asked whether to keep DNS queries to a minimum. 7


  • You may select either mbox or Maildir when asked about the delivery method used for incoming mail. While many utilities use mbox format, Maildir format can make handling individual locally delivered mail messages easier, and is widely supporting by a range of applications. 8


  • Accept the default non-split option for your mail configuration file. Enter at least one external email address (choose one that you check frequently) in addition to root when asked to specify postmaster mail recipients.9

    Test Your Mail Configuration

Use the following command to send a test email, substituting an external email address for [email protected]

echo "This is a test." | mail -s Testing [email protected]
Share Button