1 / 11

CT 320: Network and System Administration

CT 320: Network and System Administration. SENDMAIL Colorado State University Computer Science Department Chris Wilcox Fall 2012. Original slides from Dr. James Walden at Northern Kentucky University. Topics. Features of Sendmail Running Sendmail Mail Queues Configuring Sendmail

nona
Download Presentation

CT 320: Network and System Administration

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CT 320: Network and System Administration SENDMAIL Colorado State University Computer Science Department Chris Wilcox Fall 2012 Original slides from Dr. James Walden at Northern Kentucky University.

  2. Topics • Features of Sendmail • Running Sendmail • Mail Queues • Configuring Sendmail • sendmail.cf CT320: Fall Semester 2012

  3. Sendmail Tasks • Handle messages from user agents. • Understand recipient addresses. • Choosing delivery/transport agents. • Rewriting addresses to a form understood by delivery agent. • Reformatting headers as required. • Passing transformed message to delivery agent. CT320: Fall Semester 2012

  4. History of Sendmail • Written by Eric Allman in 1983. • Precursor: delivermail (1979) BSD 4.0, 4.1 • Sendmail v5 • Released 1983 for BSD 4.1c (1st TCP/IP UNIX) • IDA enhanced version appeared in 1987. • Many vendor proprietary extensions. • Sendmail v8 • Version 8.1 released 1993 for BSD 4.4 • Current release: 8.13 CT320: Fall Semester 2012

  5. Files and Directories Sendmail binary /usr/sbin, /usr/libexec, /usr/lib Links to binary for specific tasks newaliases, mailq, etc. Configuration file /etc/mail/sendmail.cf Mail queue /var/spool/mqueue Local delivery agents mail.local, smrsh, procmail Configuration and status files /etc/mail: aliases,sendmail.st,sendmail.hf CT320: Fall Semester 2012

  6. Sendmail Modes -bd: Run as daemon, listening on port 25. -bD: Run as daemon in foreground (debug.) -bh: View recent connection information. -bi: Rebuild alias database (newaliases) -bp: Print mail queue (mailq) -bt: Address test mode. -q: Process mail queue immediately. -q1h: Process queue once every hour. CT320: Fall Semester 2012

  7. When is a message queued? • All messages are placed in the queue when received, so that if there’s a crash during delivery, the message isn’t lost. • If a message is temporarily undeliverable, it remains in the queue until the next run. • If the load average is too high, messages are queued without a delivery attempt. CT320: Fall Semester 2012

  8. Mail Queues Sendmail may use multiple queues. Permanent queues. Temporary queues. A mail queue is a directory of queued msgs. qf: Header of message, control file. df: Body of message. tf: Temporary qf file while qf is updated. Tf: tf is renamed to Tf if 32+ lock attempts fail. Qf: message bounced, could not be returned. xf: Temporary transcript file of error messages. CT320: Fall Semester 2012

  9. The qf files • One of 2 primary parts of queued message. • The df file is the other part. • All parts have same unique queue identifier. • Qf file data • Headers • Priority of message in queue. • Date message will expired (and be bounced.) • Contains reason message is in queue. CT320: Fall Semester 2012

  10. Sendmail Configuration • Choice of delivery agents. • Address rewriting rules. • Mail header formats. • Options. • Security precautions. • Spam resistance. CT320: Fall Semester 2012

  11. sendmail.cf • Sendmail configuration file • A complete programming language. • Single char commands, lots of symbols, recursive rules. • Macro-configuration files • Generate sendmail.cf from m4 macro files. • Most config files can be created this way. CT320: Fall Semester 2012

More Related