Sendmail configuration and installation Presented by kathleen.

Slides:



Advertisements
Similar presentations
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.
Advertisements

NIS Consistent configuration across the network. Why NIS? Primary reason is to provide same user configuration across the network Users go any machine.
Linux+ Guide to Linux Certification, Second Edition Chapter 14 Network Configuration.
WeeSan Lee
Exchange server Mail system Four components Mail user agent (MUA) to read and compose mail Mail transport agent (MTA) route messages Delivery agent.
Chapter 13 Chapter 13: Managing Internet and Network Interoperability.
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.
1 Chapter Overview Introduction to Windows XP Professional Printing Setting Up Network Printers Connecting to Network Printers Configuring Network Printers.
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.
中華技術學院 Linux 課程 中華技術學院 Linux 課程 Chap Four : Mail 王俊城RHCE/RHCX.
Hands-On Microsoft Windows Server 2008 Chapter 8 Managing Windows Server 2008 Network Services.
Ch 8-3 Working with domains and Active Directory.
1 Linux Networking and Security Chapter 3. 2 Configuring Client Services Configure DNS name resolution Configure dial-up network access using PPP Understand.
Microsoft Windows 2003 Server. Client/Server Environment Many client computers connect to a server.
BASIC NETWORK CONCEPTS (PART 6). Network Operating Systems NNow that you have a general idea of the network topologies, cable types, and network architectures,
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
Mail Server Three major components MTA MUA MDA Mail Transfer Agent
Mail Services.
The Linux Operating System Lecture 7: Tonga Institute of Higher Education.
Lecturer: Maxim Podlesny Sep CSE 473 File Transfer and Electronic in Internet.
SMTP PROTOCOL CONFIGURATION AND MANAGEMENT Chapter 8.
Computer Networking From LANs to WANs: Hardware, Software, and Security Chapter 12 Electronic Mail.
1 Applications Electronic Mail. 2 Electronic Mail Many user applications use client-server architecture. Electronic mail client accepts mail.
INSTALLING MICROSOFT EXCHANGE SERVER 2003 CLUSTERS AND FRONT-END AND BACK ‑ END SERVERS Chapter 4.
Setting up NIS and HTTP. Network Information Service Reading: 1. Linux NIS HOWTO: howto/HOWTOhttp://
ITI-481: Unix Administration Meeting 5. Today’s Agenda Network Information Service (NIS) The Cron Program Syslogd and Logging.
CH2 System models.
ITI-481: Unix Administration Meeting 5 Christopher Uriarte Rutgers University Center for Applied Computing Technologies.
Mailing Lists Plus Ayitey Bulley
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
Learningcomputer.com SQL Server 2008 Configuration Manager.
Introduction to Internet Mail Abridged & Updated by Hervey Allen Noah Sematimba Based on Materials by Philip Hazel.
CSN09101 Networked Services Week 11: Management Module Leader: Dr Gordon Russell Lecturers: G. Russell.
Mailing Lists Plus Ayitey Bulley
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 Chapter Fifteen Linux Networking.
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-
1 Electronic Messaging Module - Electronic Messaging ♦ Overview Electronic messaging helps you exchange messages with other computer users anywhere in.
Application Layer Khondaker Abdullah-Al-Mamun Lecturer, CSE Instructor, CNAP AUST.
2  Supervisor : MENG Sreymom  SNA 2012_Group4  Group Member  CHAN SaratYUN Sinot  PRING SithaPOV Sopheap  CHUT MattaTHAN Vibol  LON SichoeumBEN.
Jabberd Quick Installation Guide. The jabberd server is the original open-source server implementation of the Jabber protocol, and is the most popular.
Module 5 Managing Message Transport. Module Overview Overview of Message Transport Configuring Message Transport.
Data Communications and Networks Chapter 5 – Network Services DNS, DHCP, FTP and SMTP ICT-BVF8.1- Data Communications and Network Trainer: Dr. Abbes Sebihi.
1 COP 4343 Unix System Administration Unit 14: – send and receive mail – mail filtering – mail server – mailing lists.
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.
Networks: LANs, WANs and Communication Protocols How do computers communicate?
Jump to first page Electronic Mail Peter D’Souza.
LinxChix And Exim. Mail agents MUA = Mail User Agent Interacts directly with the end user  Pine, MH, Elm, mutt, mail, Eudora, Marcel, Mailstrom,
Protocols COM211 Communications and Networks CDA College Olga Pelekanou
DNS DNS overview DNS operation DNS zones. DNS Overview Name to IP address lookup service based on Domain Names Some DNS servers hold name and address.
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
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.
Chapter 4: server services. The Complete Guide to Linux System Administration2 Objectives Configure network interfaces using command- line and graphical.
Application Layer instructors at St. Clair College in Windsor, Ontario for their slides. Special thanks to instructors at St. Clair College in Windsor,
Understanding POP3 / IMAP Created by : Ashish Shah, J. M. Patel College of Commerce 1.
File System Implementation
SUBMITTED BY: NAIMISHYA ATRI(7TH SEM) IT BRANCH
IIS.
has many aspects that work together to give people almost instant communication from any computer on the internet to any other computer There.
Unit – 4 Chap - 2 Mail Delivery System
Chapter 7 Network Applications
Presentation transcript:

Sendmail configuration and installation Presented by kathleen

Importance Business and personal communication Business and personal communication Each company provides some type of service Each company provides some type of service Important to learn how to install and build and configure sendmail Important to learn how to install and build and configure sendmail

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

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

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

Possible Necessities YP (NIS) server YP (NIS) server User names and passwords to allow client machines about usernames. Providing central services User names and passwords to allow client machines about usernames. Providing central services Unless you share the same passwd file Unless you share the same passwd file

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

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

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

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

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

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

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

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

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

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

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

Clients Copy new version of sendmail Copy new version of sendmail Copy sendmail.cf Copy sendmail.cf Make sure following are mounted from servers Make sure following are mounted from servers /var/mail /var/mail /usr/local /usr/local /home /home

Various Types of Clients with Different Operating Systems For each OS and version compile a new sendmail 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 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 Create a new sendmail.cf file for each type of operating system supported. Use the m4 interpreter Solaris Solaris Linux Linux Irix Irix

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

More problem solving… make sure mail is being placed into mqueue at least temporarily directory 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 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. Make sure mail is being placed in user /var/mail/username. Simply cat out user file Simply cat out user file Make sure you created a mail inbox in /var/mail Make sure you created a mail inbox in /var/mail

Any questions? Any questions?