12.07.2015 Views

download

download

download

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 13Note the NONE keyword, which will completely disable the sendmail process. Youshould therefore use SMTP servers on the other hosts on the network, if you want totransmit emails.Once the sendmail process is enabled, it works out of the box in simple scenariossuch as routing mails for local users. The sendmail related configuration files arelocated in the /etc/mail/ subdirectory.The sendmail configuration files may seem somewhat bizarre to you, asthey are extremely different from the configuration files that you haveseen in other parts of the system. This is because the configuration isbased on the m4 "macro language processor".The most important files that you may need to modify in your configuration arealiases, local-host-names, and virtusertable.The aliases file contains the email address aliases that would be used to redirectemails to the local users. An example of aliases files looks like this:root: babakpostmaster: mail-admins@example.orgbit-bucket: /dev/nullmsgs: "| /usr/bin/msgs –s"This example shows the incoming mail messages for specific users being delivered toanother local user, remote user, a file, or being piped to a program.Once you have modified the aliases file, you should run thenewaliases(1) command to update the aliases database.The sendmail program uses the current hostname to figure out whether theincoming email messages belong to this host, or they should be forwarded to anotherhost (or rejected).In case the actual hostname is different from the host name that you want to receivemails for, or if you want to receive email for multiple hosts, the hostnames should bespecified (one hostname per line) in the /etc/mail/local-host-names file:example.commail.example.comhost.example.comThis will tell sendmail to receive and deliver emails to local users if the destinationaddress matches any of the listed addresses in this file.[ 225 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!