Introduction to Unix Sendmail. It's been said that you aren't a real Unix system administrator until you've edited a sendmail.cf file. It's also been.

Slides:



Advertisements
Similar presentations
Enabling Secure Internet Access with ISA Server
Advertisements

The Application Layer Chapter 7. Where are we now?
Lesson 7: Business, , & Personal Information Management
Linux+ Guide to Linux Certification, Second Edition Chapter 14 Network Configuration.
WeeSan Lee
Series DATA MANAGEMENT. 1 Why ? Alarm/Status Notification –Remote unattended sites »Pumping stations –Pharmaceutical/Plant maintenance.
Chapter 30 Electronic Mail Representation & Transfer
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Application Layer Functionality and Protocols Network Fundamentals – Chapter.
2440: 141 Web Site Administration Services Instructor: Enoch E. Damson.
Introduction 1 Lecture 7 Application Layer (FTP, ) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
Pro Exchange SPAM Filter An Exchange 2000 based spam filtering solution.
中華技術學院 Linux 課程 中華技術學院 Linux 課程 Chap Four : Mail 王俊城RHCE/RHCX.
-I CS-3505 Wb_ -I.ppt. 4 The most useful feature of the internet 4 Lots of different programs, but most of them can talk to each.
Introduction 1-1 Chapter 2 FTP & Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 IC322 Fall.
Sendmail configuration and installation Presented by kathleen.
1 Linux Networking and Security Chapter 3. 2 Configuring Client Services Configure DNS name resolution Configure dial-up network access using PPP Understand.
Electronic Mail (SMTP, POP, IMAP, MIME)
1 What is Electronic Mail Exchanging information via computer networks Electronic mail addresses SMTP (Simple Mail Transfer Protocol) Client/Server based.
INTRODUCTION TO WEB DATABASE PROGRAMMING
Introduction to Unix SMTP & Sendmail.
1 Application Layer Lecture 5 Imran Ahmed University of Management & Technology.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
Mail Server Three major components MTA MUA MDA Mail Transfer Agent
The Linux Operating System Lecture 7: Tonga Institute of Higher Education.
1 Computer Communication & Networks Lecture 27 Application Layer: Electronic mail and FTP Waleed.
SMTP PROTOCOL CONFIGURATION AND MANAGEMENT Chapter 8.
Computer Networking From LANs to WANs: Hardware, Software, and Security Chapter 12 Electronic Mail.
Electronic Mail Originally –Memo sent from one user to another Now –Memo sent to one or more mailboxes Mailbox –Destination point for messages.
1 Applications Electronic Mail. 2 Electronic Mail Many user applications use client-server architecture. Electronic mail client accepts mail.
思科网络技术学院理事会. 1 Application Layer Functionality and Protocols Network Fundamentals – Chapter 3.
ISQS server attacks Presented by Deven Patel.
Simple Mail Transfer Protocol (SMTP)
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Application Layer Functionality and Protocols.
CH2 System models.
ITI-481: Unix Administration Meeting 5 Christopher Uriarte Rutgers University Center for Applied Computing Technologies.
1 Apache. 2 Module - Apache ♦ Overview This module focuses on configuring and customizing Apache web server. Apache is a commonly used Hypertext Transfer.
Introduction to Internet Mail Abridged & Updated by Hervey Allen Noah Sematimba Based on Materials by Philip Hazel.
Configuring Linux Mail Servers Objectives –This chapter will show you how to install and use Mailservers Contents –An Overview Of How Sendmail Works –Sendmail.
Linux+ Guide to Linux Certification, Second Edition Chapter 14 Network Configuration.
Postfix Mail Server Postfix is used frequently and handle thousands of messages. compatible with sendmail at command level. high performance program easier-
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Network Protocols Chapter 26 (Data Communication and Networking): Remote Logging, Electronic Mail, and.
1 Electronic Messaging Module - Electronic Messaging ♦ Overview Electronic messaging helps you exchange messages with other computer users anywhere in.
1 SMTP - Simple Mail Transfer Protocol –RFC 821 POP - Post Office Protocol –RFC 1939 Also: –RFC 822 Standard for the Format of ARPA Internet Text.
Application Layer Khondaker Abdullah-Al-Mamun Lecturer, CSE Instructor, CNAP AUST.
Module 5 Managing Message Transport. Module Overview Overview of Message Transport Configuring Message Transport.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2001 TCP/IP Application Layer.
CS 3830 Day 9 Introduction 1-1. Announcements r Quiz #2 this Friday r Demo prog1 and prog2 together starting this Wednesday 2: Application Layer 2.
LinxChix And Exim. Mail agents MUA = Mail User Agent Interacts directly with the end user  Pine, MH, Elm, mutt, mail, Eudora, Marcel, Mailstrom,
XP New Perspectives on The Internet, Sixth Edition— Comprehensive Tutorial 2 1 Evaluating an Program and a Web-Based Service Basic Communication.
Protocols COM211 Communications and Networks CDA College Olga Pelekanou
SMTP Tapu Ahmed Jeremy Nunn. Basics Responsible for electronic mail delivery. Responsible for electronic mail delivery. Simple ASCII protocol that runs.
A Quick Look At How Works Understanding the basics of how works can make life a lot easier for any user. Especially those who are interested.
4343 X2 – Outline The Domain Name System The Web.
Linux Operations and Administration
SMTP - Simple Mail Transfer Protocol RFC 821
Linux Operations and Administration Chapter Twelve Configuring a Mail Server.
ITI-481: Unix Administration Meeting 5 Christopher Uriarte Rutgers University Center for Applied Computing Technologies.
1 Kyung Hee University Chapter 22 Simple Mail Transfer Protocol (SMTP)
26.1 Electronic Mail Sending/Receiving Mail Addresses User Agent MIME Mail Transfer Agent Mail Access Protocols.
Chapter 4: server services. The Complete Guide to Linux System Administration2 Objectives Configure network interfaces using command- line and graphical.
Spring 2006 CPE : Application Layer_ 1 Special Topics in Computer Engineering Application layer: Some of these Slides are Based on Slides.
© MMII JW RyderCS 428 Computer Networks1 Electronic Mail  822, SMTP, MIME, POP  Most widely used application service  Sometimes only way a person ever.
Networking Applications
Remote Logging, Electronic Mail, and File Transfer
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
SUBMITTED BY: NAIMISHYA ATRI(7TH SEM) IT BRANCH
has many aspects that work together to give people almost instant communication from any computer on the internet to any other computer There.
William Stallings Data and Computer Communications
Unit – 4 Chap - 2 Mail Delivery System
Chapter 7 Network Applications
Presentation transcript:

Introduction to Unix Sendmail

It's been said that you aren't a real Unix system administrator until you've edited a sendmail.cf file. It's also been said that you're crazy if you've done it twice.

O’Reilly’s “Bat Book” 4th Edition -- covers Versions 8.10 through 8.14 Flying Fox (a species of fruit bat)

What is Sendmail? Sendmail is the most widely used Mail Transport Agent (MTA) on the internet MTAs send mail from one machine to another. Sendmail is not a client program, which you use to read your . Sendmail is one of the behind-the-scenes programs which move over the Internet. Normally it runs as a background daemon Can even be run out of the super daemon (xinetd)

Implementations SMTP Gateway An SMTP gateway allows users on your network to communicate with others on the Internet without concern as to which local mail software package exists on your network. All incoming mail for your network will pass through this gateway which converts the message into the appropriate format specific to your local mail software. Similarly, all mail destined for the Internet from your network will pass through this gateway to be sent across the Internet via SMTP

Implemetations SMTP Relay ”Warning Will Rogers” An SMTP relay is a machine that actually sends the mail across the Internet. A common misconception is that SMTP gateways are the same as SMTP relays. This is not always the case. There are SMTP gateways that act as relays themselves, but there are also many that do not. If the latter is the case on your network, you'll need to bounce your mail off one of the relays.

The Pieces The binary: /sbin/sendmail The configuration file: /etc/mail/sendmail.cf Supporting files: /etc/mail/access /etc/mail/aliases …and many more

More Pieces messages are stored in the directory: /var/spool/mail There is a separate file for each user waiting to be sent./var/spool/mqueue A log of sent and received: /var/log/mail

Sendmail Features Sendmail uses DNS (Domain Naming System) But not 100% dependent: DNS provides Mail Exchange (MX) Info Sendmail can do a DNS double-tap Lookup up who the client says they are Sendmail default is “mail relay off” Realtime Blackhole Lists (RBL) Mail Relay checkers - - Open Mail Relay Db

Sendmail Anti-Spam Enhancements Mailscanner Minimal anti-spam Anti-virus integration (scan in/outbound) Or Spam Assassin Rule based heuristic Header and text analysis Blacklist (RBL) Vipul's Razor (

Sendmail configuration and installation

Basic configuration Many types of configuration possible Separate mail servers on one network Mails forwarded to a gateway then forwarded onto individual mail-servers One mail server with many clients Method Chosen: One mail server  Problems occur with too much load  Overcome by load balancing through many mail servers with same disks  Method most chosen in sites (easier to administrate)

Concepts of sendmail Simple installation Mail user agent-read and compose messages  pine – cursor based graphical mail viewer  mail – command line mail Mail transport agent- accepts mail from user agent, understand recipients address. Gets mail to correct host for delivery  esmtp- extended simple mail transport protocol  Or smail, qmail, exim Delivery agent – accepts mail from transport and delivers it to appropriate recipients  Mail, /bin/sh, procmail,pop, phquery, uucp  Mail – simple user delivery agent

Necessities Other software needed besides sendmail DNS server Canonical name for local host Looks up hosts that connect Looks up hosts for delivery SMTP to find the address to connect to File System /var/mail access inbox/spool for clients /home to access simple files /usr/local or software to access mail software

Checklist for DNS mailserver An mx record on dns Hosts A lookup record Name to IP A reverse lookup record (validation purpose) IP to Name /etc/hosts

Compile retrieve off of sendmail.org untar and unzip compile.sh Build Configuration (m4 Macros) Choose a configuration file matching your os Generic-linux.m4 Compile and Configure

m4 Configuration Files M4 a macro preprocessor that produces a sendmail configuration file by processing a file that ends in.mc. Macros used are: define – defines a macro undefine – discards a previous definition include – includes a file dnl – discards characters up to including the next new line divert – manages output streams

Types of Configuration OSTYPE is the operating type Linux, sgi, solaris Specifies directories of where files are located for normal sendmail including queues and spool directories through variables Chose ostype(linux) VERSIONID version id of the sendmail you build

More Configuration DOMAIN allows to include domain files for site specific information Use generic for small sites Large sites spam, databases, tables MAILER delivery agent specifications. Types:  Local,smtp,fax,usenet,procmail… Used  local and smtp  MAILER(`local’) MAILER(`smtp’) Computer science dept:  Procmail, local, and smtp

Even more Configuration FEATURE Options to change sendmail’s behavior use_cw_file – necessary, names of all local hosts for which this host accepts  “ whatever.com”, “mail.whatever.com” redirect – allows forwarding access_db – necessary, consists of ips, or domains  Specify rejects, OK, discard or relay for machines to use smtp on that server.  Must use makemap hash /etc/mail/access < /etc/mail/access

No not more….. configuration nocanonify  Avoid dns lookups locally.  Used for client transport agents nullclient  FEATURE(`nullclient’,`mail.whatever.com’)  All mail is delivered to the mailserver MASQUERADE_AS allow multiple machines hide behind one single identity  MASQUERADE_AS(`cs.umbc.edu’)  MASQUERADE_AS(`whatever.com’) MAIL_HUB Automatically done Incoming mail smtp:mail.whatever.com SMART_HOST Automatic with masquerade Outgoing mail smtp:mail.whatever.com

Configuration Server configuration OSTYPE(`linux’) DOMAIN(`generic’) FEATURE(`use_cw_file’) FEATURE(`access_db’) MASQUERADE_AS(`whatever.com’) MAILER(`local’) MAILER(`smtp’) Client configuration OSTYPE(`linux’) FEATURE(`nocanonify’) FEATURE(`nullclient’, `mail.whatever.com’)

Creating cf file Build cf file for client/server make filename.cf cp filename.cf /etc/mail/sendmail.cf Client configuration is copied for client Server configuration is copied for server

/etc/aliases Necessary file for sendmail System wide config file maintained by administrator Computer Science Dept. uses lists, and aliases for professors Should always contain postmaster Sendmail will not work without this file Trust me….. Can contain include files for lists or other interfaces to majordomo (CS) or listproc like (OIT) Majordomo = FREE Listproc = expensive Configuration for sendmail has to enable /bin/sh for majordomo or listproc

Running Sendmail Should be done in RC scripts Linux has a rc file already if sendmail is installed Kill –TERM pid to kill sendmail /usr/sbin/sendmail -bd –q1h & to run again mv mqueue if queue is clogged, located in /var/spool/mqueue

Various Types of Clients with Different Operating Systems For each OS and version compile a new sendmail Make sure all clients share the same version of sendmail. Or sendmail not interact properly with server and client Create a new sendmail.cf file for each type of operating system supported. Use the m4 interpreter Solaris Linux Irix

Problem Solving for Configuration Ensure smtp is running on mail-server telnet to hostname w/ port 25 from client If connection refused major problem Try from mail server as well cd /var/log and tail messages Make sure variables are sound and correct on start up Make sure dns resolving and lookups are correct when mails are received tail maillog Make sure no errors have been reported

More problem solving… make sure mail is being placed into mqueue at least temporarily directory Also try typing mailq to see if they are not being delivered to end user Make sure mail is being placed in user /var/mail/username. Simply cat out user file Make sure you created a mail inbox in /var/mail

References RFC’s: RFC Simple Mail Transfer Protocol RFC Standard for the Format of ARPA Internet Text Messages RFC MIME (Multipurpose Internet Mail Extensions) Explained