Sendmail Basic Configuration

From Webmin Documentation
Jump to: navigation, search

When first installed Sendmail will only need a few small changes in order to begin providing service for sending and receiving mail. The first step is to specify for whom mail will be accepted, which you will specify in the Local Domains page, while the second step will be to permit local network users to send, or relay, email through the server, which will be specified in the Spam Control page.

This tutorial assumes you have already configured DNS service for your network, including an MX record for your domain. If you haven't already done so, refer back to the BIND chapter, and configure name resolution before attempting the steps in this tutorial.

Configuring Domains to Receive Mail For

By default, Sendmail is not configured to receive mail for any host or network other than the machine on which it is running. So you must first configure Sendmail to permit anyone to send mail for delivery to your domain through your server. Open the Local Domains page, and enter the domains for which your server will accept mail. In my case, I would enter Any number of domains can be entered here, as can host names, so I could also enter if ever I expected mail to be delivered to that address.

Click the Save button to update the file. This will add new Cw lines to include your specified domains.

Permitting Local Users to Relay

The next step to achieving a simple mail server is to permit your local users to send mail through your server. Click on the Spam Control icon, and create one or more rules matching your local networks. To create a new rule, first select a Mail source of Network, and specify the IP of the network you'd like to relay for. For example, on a local network using private IP addresses, one might enter 192.168.1 to specify all of the hosts in the network. Then, select Allow relaying, and click Create to add the new rule to the access file.

Finally, return to the primary Sendmail page, and click the Start Sendmail button. It is usually useful to keep an eye on the logs when starting a daemon so that problems will be immediately obvious. Sendmail logs to the maillog on most systems, which is likely located in /var/log directory. You can use the Webmin System Logs module to view this log.