------------------------- Week 11 Notes for NET2003 ------------------------- -Ian! D. Allen - idallen@idallen.ca Remember - knowing how to find out an answer is more important than memorizing the answer. Learn to fish! RTFM! (Read The Fine Manual) Keep up on your readings (Course Outline: average 5 hours/week homework) [************************************************************] [************************************************************] [*** Students should be taking their own notes in class ***] [*** and updating them with my published summaries. ***] [************************************************************] [************************************************************] Abbreviation "ALN" = your "Advanced Linux Networking" text by R.W.Smith Last week: - xinetd - TCP Wrappers - DHCP client - SSH daemon - POP3 ============================================================================== see Notes: Mail Systems Terminology - mail_systems_terms.txt =============================================================================== Configuring SMTP (Postfix) - ALN Chapter 19 p.507 ---------------- Linux offers several SMTP (Mail Transfer Agent - MTA) programs. (The ALN text calls these mail delivery or "Push" protocols [p.477].) The most well-known is the ancient "sendmail" program whose configuration file "has traditionally been described as looking like an explosion in a punctuation factory". Debian Linux uses the more modern Postfix MTA. Q: True/False: an SMTP server is known as a Mail Transfer Agent ("MTA"). p.478 Q: What is the purpose of an MTA? p.478 Q: True/False: most Linux systems install an SMTP server by default. p.479 - Sendmail was the original. Postfix is a good replacement. p.480 - Describe the traditional Unix "mbox" mail format used by sendmail/Exim/Postfix? p.480-481 - Describe the new "maildir" mail format used by qmail. p.481 Q: What is a DNS "MX" record? p.481 The "host -t mx " command can list MX records for . You can also use "dig mx". Q: What command will show the MX records for a domain? - What are the MX records for algonquincollege.com? for idallen.org? Q: What purpose do the sequence numbers have in a set of MX records? p.482 - lowest first! Q: Describe the difference between "envelope headers", "message headers", and "message data". p.482-483 Q: Know how to connect to an SMTP server using netcat or telnet and verify that it's working. p.483 See Notes file smtp_session.txt Q: True/False: the message headers are optional and can be omitted; the email will still be delivered. p.483 Q: True/False: the envelope headers must match the message headers. p.484 Q: What is a big advantage of the Postfix config file over sendmail's config file? p.507 Skip "SMTP Server Configuration Options" p.485-491 Skip "Basic Sendmail Configuration " p.491-499 Skip "Basic Exim Configuration " p.499-507 Postifx is the default MTA for Ubuntu (and your VNS). - Text Update: The more commented postfix default config file is now named "main.cf.dist" and may be stored elsewhere than /etc/postfix/ (e.g. /usr/share/postfix/main.cf.dist). The main.cf file contains only the few lines that change the default postfix operation. p.508 Q: Which Postfix config file is usually modified (absolute path)? p.508 Note how the main.cf file refers to other config files, such as aliases. Q: What Postfix file usually contains system-wide mail aliases? p.508 Alias files are usually stored in a binary database format, for speed. Q: How do you generate the binary .db files from the text files? p.508 Postfix comes with its own control command that lets you affect how the postfix system operates. Q: What is the name of the postfix command-line control program? p.509 (top) (Only the super-user can use this.) Q: How is the Postfix server usually started/stopped? p.509 (top) - Does the start-up script for postfix run the postalias command? (Go look!) Q: Which Postfix parameter controls the hostnames that postfix treats as "local" and for which it will receive mail? p.510-511 Q: How do you continue a long line in the postfix config file? p.511 Q: Which Postfix parameters control the hostnames/networks that postfix will allow to relay email through this host? p.511-512 Note: See alsto "mynetworks_style" in more recent versions of Postfix. Q: What Postfix parameter sets the name of a "smart" SMTP relay host? p.512 Q: What is the difference between "the hosts that I will permit to relay via this host" and "the host to which I relay all email (smart host)"? Useful commands: "mailq" - show the queue of outgoing messages. "postfix reload" - reload most of the config file parameters (see log) "postfix check" - check your postfix installation "postfix set-permissions" - fix permissions in your postfix installation Q: What command shows the mail queue? Q: You can say "postfix stop". Why can't you say "postfix start"? Postfix can put your email into your mailbox (MDA) using a built-in method, or by calling something like procmail to to do it. Procmail is a program with a pattern-matching language for sorting and filtering mail messages. ALN p.515 Q: T/F Postfix can also act as an MDA and put email into your system mailbox.