Configuring sendmail

The primary configuration information for sendmail is stored in the file /etc/sendmail.cf. Additional configuration information is stored in the directory /etc/mail. The file /etc/sendmail.cf is a text file that contains configuration information consisting of name/value pairs on separate lines of the file.

Most systems that run sendmail create the file /etc/sendmail.cf from another file, send-mail.mc, which is often stored in the /etc/mail (Linux systems such as Red Hat) or

/usr/lib/mail/cf (Solaris) directory. The file sendmail.cf is generated from sendmail.mc using the m4 command, which is a macro processor that expands the condensed configuration information in sendmail.mc into the more verbose but more complete sendmail.cf file.

Luckily, SUSE simplifies sendmail configuration by providing a graphical configuration mechanism in YaST. The YaST configuration module for sendmail and the shell scripts and configuration files that it uses were all installed automatically as part of SUSE's sendmail package. Configuring any MTA in YaST is done in the same location, which is Network Services O Mail Transfer Agent. The underlying scripts implement any changes or additional options provided by different support MTAs on SUSE Linux, such as Postfix, sendmail, and Exim. This section describes the most common configuration options that you may want to set or change in YaST's sendmail configuration module.

After starting YaST's MTA configuration module (Network Services O Mail Transfer Agent or yast2 mail from the command line), you see the screen shown in Figure 17-3.

FIGURE 17-3

Specifying your network connection

FIGURE 17-3

Specifying your network connection

On this screen, you identify the type of network connection that is used by the host on which you are running sendmail. If you want to automatically include virus scanning as part of receiving incoming mail, click the Enable virus scanning (AMaViS) check box. (If this package is not already installed, YaST will prompt you for the appropriate CD or DVD media at the end of the sendmail configuration process.) After selecting the appropriate options on this screen, click Next. The screen shown in Figure 17-4 is displayed.

FIGURE 17-4

Specifying an outgoing mail server

FIGURE 17-4

Specifying an outgoing mail server

If you are configuring sendmail on a host where you want to be able to receive and deliver mail, but your site uses a central mail server for relaying e-mail to the Internet or other local networks, enter the name of this central server on this screen. If sendmail will need to authenticate to this server in order to send mail through it, click Authentication and enter the name and password of the user that sendmail should use to authenticate. (This is often a user named "sendmail," for whom a specific account has been created.) Click OK to record any changes that you have made and return to the Outgoing mail pane, or click Back to return to the Outgoing mail pane without making any changes.

If you want mail sent from the host that you are configuring to appear to be from a different domain, click Masquerade and enter the information about that domain that you want to appear in the headers of mail sent by sendmail. This pane also enables you to configure sendmail to make mail from specific local users to appear to come from selected locations, which can be useful for mail from system accounts that you do not want to reflect the name of the specific host from which they were sent. Click OK to record any changes that you have made and return to the Outgoing mail pane, or click Back to return to the Outgoing mail pane without making any changes.

Click Next to continue the configuration process and display the screen shown in Figure 17-5.

The most important setting on this panel is the Accept remote SMTP connections setting. By default, sendmail listens on a system's loopback interface and uses that to locally deliver mail that has also been sent locally. You will therefore need to enable the Accept remote SMTP connections setting if you want your system to be able to accept and deliver mail sent from other systems (such as if you are setting up a system that will deliver or relay mail sent by other systems).

FIGURE 17-5

Specifying incoming mail parameters

FIGURE 17-5

Specifying incoming mail parameters

The other settings on this panel enable you to specify a port that sendmail can use to retrieve and send mail, and to identify a remote mail server from which sendmail should retrieve mail for local delivery.

This panel also enables you to specify a central address to which you would like mail to the root user on your current system to be delivered. This is the most common example of e-mail aliasing, which is the ability to specify the destination to which mail addressed to a specific local user should be forwarded or delivered. Clicking the Aliases button displays a screen that enables you to add other e-mail aliases, which will be stored in the file /etc/mail/aliases. Similarly, clicking the Virtual domains button enables you to specify the addresses to which mail addressed to non-local users should be forwarded or delivered.

Click Finish to complete your configuration of sendmail. If you enabled antivirus scanning and the AMaViS package is not already installed, YaST will prompt you for the appropriate CD or DVD media at this point. If this is the case, insert the appropriate media and wait for the installation to complete.

YaST completes the sendmail configuration process by running SUSEConfig for you, which generates and updates /etc/sendmail.cf for you, as well as any of the files in /etc/mail that have been affected by your configuration changes.

Was this article helpful?

0 0

Responses

  • Steffen
    How to set up sendemail in linux suse?
    12 months ago
  • william
    Which location contains configuration information for Sendmail?
    11 months ago
  • Arabella
    How to install ssmtp server on opensuse?
    3 months ago

Post a comment