Configuring Linux Mail

Posted in Linux, Technical by admin on January 8th, 2008

Configuring Linux Mail


Introduction :

In a business company or organization a dedicated mail server must be required because email is an important part of website. Here is brief description about how to use sendmail to create mail server in Linux which will be used to communicate with users emails with a local mail box. You will read here how to install and start sendmail.


Configuring Sendmail

Domain mails are handled by setting up DNS to use MX record within the configuration zone file. Sendmail is the most popular Linux mail agent between some others like postfix and qmail. The steps to convert Linux box into sendmail server is as follows.


Sendmail Working

sendmail agent can handle both incoming and outgoing emails for your domain. Here is the detail of incoming mail and outgoing mail.

Incoming Mail

Using a Linux mail server each user has his own separate login account. Mails sent to users are stored on mail server and then sendmail forward them into the users login account.
Mails are not sent directly towards the user’s machine but these are retrieved from the mail server using some mail client software like Microsoft Outlook or Outlook Express which supports both POP and IMAP protocols.
Some text based GUI clients and Evolution can used by users to read mails from the mail server directly and workstation users can also use these applications to access their mails from remote side.

Outgoing Mail

When you are sending mails using mail server the procedure is somehow different. PC and Linux workstation users configure their email client software to create their own outbound SMTP mail server.
If it would be used for local users in specific domain then sendmail stores a message in the customer mail box and they can retrieve it.
However if mail is going to send towards another domain then sendmail first uses DNS to retrieve MX record of other domain. It then tires to send mail to suitable destination mail server by using SMTP protocol.

Installing Sendmail

Redhat and Fedora packages are available in RPM format mostly and you need to make sure that sendmail-cf and m4 packages are already installed. While looking for RPMs keep in mind that filename normally starts with package name and version number like sendmail-8.12.10-1.1.1.i386.rpm.

Starting Sendmail

Use chkconfig command to check sendmail configuration.

[root@linux-server tmp]# chkconfig sendmail on
These commands are used to start,stop and restart sendmail after booting process.

[root@linux-server tmp]# service sendmail start

[root@linux-server tmp]# service sendmail stop

[root@linux-server tmp]# service sendmail restart

Keep in mind that to restart sendmail procedure each time you have to make some changes to configuration files to take effect during running process.
Pgrep command is used to test whether sendmail process is running or not.


[root@linux-server tmp]# pgrep sendmail

You will get a reply of plain old process ID numbers.

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists

Leave a Comment