190 likes | 328 Views
Sendmail: Setting Up Mail Clients, Servers, and More. Chapter 20. Topics. Configuring the sendmail client Configuring the sendmail server How sendmail works SpamAssassin Alternatives to sendmail Class Challenge. sendmail. Sendmail is more than a single program
E N D
Sendmail: Setting Up Mail Clients, Servers, and More Chapter 20
Topics • Configuring the sendmail client • Configuring the sendmail server • How sendmail works • SpamAssassin • Alternatives to sendmail • Class Challenge
sendmail • Sendmail is more than a single program • Its a collection of programs, files, directories and services
sendmail Client Side • MUA – Mail User Agent • Acts as a bridge between the user and the mail system • Common MUAs include Kmail, Thunerbird, Outlook, mutt • When you send an email the MUAhands the file to the MTA or Mail Transfer Agent
Mail Transfer Agent (MTA) • sendmail is an MTA responsible for email to the server for distribution.
Mail Delivery Agent (MDA) • An MDA such as procmail puts the mail in the recipients mailbox file
The Roles of sendmail • Aliasing • Queuing • Local Delivery • Forwarding mail to another system • Receiving incoming mail
Aliasing • The conversion of one recipient name into another • Used to convert generic names such as root into real names • Also used to convert one name into a list of many names (for mailing lists etc.)
Queuing • When mail cannot be delivered Sendmail queues it in a queue directory • The location is defined by the OQ line in the configuration file
Local Delivery • Local delivery is accomplished by one of the following • Appending the message to the users mailbox • Feeding the message to a program • Appending the message to another file • Admin – alias for Chris • Abuse – alias for Chris • Webmaster – alias for Chris
Forwarding of Mail • Sendmail has the internal ability to forward mail over a TCP/IP network only • All other networks such as UUCP, AppleTalk or FAX are handled by calling other programs
Receiving local mail • Just as Sendmail can forward email over a TCP/IP network • It can also receive mail over that network
How sendmail works • Outbound mail • MUA passes to sendmail • Sendmail creates a queue in /var/spool/mqueue • Sendmail generates a temporary copy of the message and sends it along to the server • Once it is successfully sent it deletes the files from the queue
How sendmail works • Inbound mail • The MDA stores incoming messages in the users mail spool at /var/spool/mail • MUA collects the mail from this location and stores it by default in the users home directory
Additional Mail Tools • SpamAssassin • Unsolicited commercial email (UCE) accounts for more that 80% of all traffic • SpamAssassin assesses each piece of email coming into a system and assigns it a number indicating the likelihood that it is spam • The SpamAssassin package needs to be installed on a server.
Popular Spam Filters • Spamato • Free and features plug-ins that make it easy to use in Outlook and Mozilla Thunderbird • POPFile • Uses Bayesian statistical analysis to sort your email automatically • Spam Blocker • Claims 100% success!?!?
KMail • Kmail is a GUI client for KDE that is compatible will all current email standards (POP3, SMTP, IMAP, etc) • Easy setup and familiar behaviour
Alternatives to sendmail • Over time sendmail has become extremely complex to manage • It complexity makes it a challenge to configure • Alternative packages include: • Postfix – attempts to be fast and easy to admin • Qmail – direct competitor to Postfix
Class Challenge • Set up 2 servers and 2 clients and get mail going from one client to the other. • Postfix starting point - http://www.postfix.org/BASIC_CONFIGURATION_README.html • Qmail starting point - http://www.lifewithqmail.org/lwq.html