S ystem P rogrammers' A ssociation for R esearching C omputer S ystems Popular MTAs EXIM & POSTFIX SPARCS 10 이대근 (harry)

Slides:



Advertisements
Similar presentations
Basic Communication on the Internet:
Advertisements

Application: Electronic Mail Linda Wu (CMPT )
Electronic Mail. Functionality First software allowed a user to send some text to another user connected to Internet; Current systems allow.
CS 497C – Introduction to UNIX Lecture 38: - Electronic Mail Chin-Chih Chang
Chapter 30 Electronic Mail Representation & Transfer
Introduction to the Secure SMTP Server service. Secure SMTP server is a secure, reliable SMTP mail relay server for your outgoing mail. Secure SMTP service.
POP Configuration Microsoft Outlook Express 6.x.
2440: 141 Web Site Administration Services Instructor: Enoch E. Damson.
中華技術學院 Linux 課程 中華技術學院 Linux 課程 Chap Four : Mail 王俊城RHCE/RHCX.
Boris Tshibangu. What is a proxy server? A proxy server is a server (a computer system or an application) that acts as an intermediary for requests from.
1.  The Linux system of permissions is much more difficult than that of Windows  System administrators are given more control with the use of three.
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)
Implementing POP3 and IMAP4 Using Dovecot
Microsoft Windows 2003 Server. Client/Server Environment Many client computers connect to a server.
Chapter 7: Using Windows Servers to Share Information.
Mail Server Three major components MTA MUA MDA Mail Transfer Agent
Mail Services.
The Linux Operating System Lecture 7: Tonga Institute of Higher Education.
SMTP PROTOCOL CONFIGURATION AND MANAGEMENT Chapter 8.
1 北區機房 IP 維運處暨 IDC 維運組 鄭任峰 郵件系統維運 課程 : Sendmail 與 postfix 的設定與比較 北區機房 IP 維運處暨 IDC 維運組 鄭任峰.
Module 4: Add Client Computers and Devices to the Network.
Webmail. Agenda Why use webmail? Why use webmail? What is webmail What is webmail – basic » system MDA MDA MTA MTA MUA MUA »Protocol SMTP SMTP.
CSIE 1 Filtering mail Speaker: Chung yu Wu Adviser: Quincy Wu Date: 2005/12/07.
SMTP/POSTFIX.
ISQS server attacks Presented by Deven Patel.
Simple Mail Transfer Protocol (SMTP)
Recovery-Oriented Computing User Study Training Materials October 2003.
Finish configuration cloudclinica root jdbc:postgresql:5432//localhost/cc_db JDBC Url: JDBC Driver: User name: Password: ******** org.postgresql.Driver.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Application Layer Functionality and Protocols.
ITI-481: Unix Administration Meeting 5 Christopher Uriarte Rutgers University Center for Applied Computing Technologies.
The Internet 8th Edition Tutorial 2 Basic Communication on the Internet: .
Mail Service Mail Service using Postfix Campus-Booster ID : **XXXXX
2. Fax Server (Unified Message)
Postfix Mail Server Postfix is used frequently and handle thousands of messages. compatible with sendmail at command level. high performance program easier-
Mailserver. Why Postfix ? Sendmail’s legacy Built from ground up Central queue-ing More future-proof Exim4 default of debian, but...
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.
Module 7: Managing Message Transport. Overview Introduction to Message Transport Implementing 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.
Homework 3 Mail System Hint.
LinxChix And Exim. Mail agents MUA = Mail User Agent Interacts directly with the end user  Pine, MH, Elm, mutt, mail, Eudora, Marcel, Mailstrom,
1 Copyright © 2015 Pexus LLC Patriot PS Personal Server How to configure as a Mail server.
INTRODUCTION Using Electronic one can send message to, can receive usages from other computer users anywhere in the world. is most common and.
Linux Operations and Administration
SMTP - Simple Mail Transfer Protocol RFC 821
1 Web Server Administration Chapter 8 Providing Services.
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)
[1] Control Spam by the Use of Greylisting Torgny Hallenmark LDC - Computing Center Lund University, Sweden TERENA Networking.
VIRTUAL SERVERS Chapter 7. 2 OVERVIEW Exchange Server 2003 virtual servers Virtual servers in a clustering environment Creating additional virtual servers.
Week-2 (Lecture-1) An electronic message sent from one computer to another. contains account i.e. How does.
Application Layer instructors at St. Clair College in Windsor, Ontario for their slides. Special thanks to instructors at St. Clair College in Windsor,
101 Derek Carter
Understanding POP3 / IMAP Created by : Ashish Shah, J. M. Patel College of Commerce 1.
concepts & protocols
SMTP - Simple Mail Transfer Protocol POP - Post Office Protocol
Network Administration Practice Homework4 – Mail System
Unix System Administration
SUBMITTED BY: NAIMISHYA ATRI(7TH SEM) IT BRANCH
LPIC-2 Real Q&As. How is the LDAP administrator account configured when the rootdn and rootpw directives are not present in the slapd.conf file?
IIS.
has many aspects that work together to give people almost instant communication from any computer on the internet to any other computer There.
Configuring Internet-related services
Unit – 4 Chap - 2 Mail Delivery System
Chapter 7 Network Applications
 Zone in name space  DNS IN THE INTERNET  Generic domains :There are fourteen generic domains, each specifying an organization type.
Data Communications and Networks
Presentation transcript:

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems Popular MTAs EXIM & POSTFIX SPARCS 10 이대근 (harry)

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems MTA M ail T ransfer A gent M essage T ransfer A gent or

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems Let’s recall…

MTA MUA (ex: outlook express) MUA 그냥 새 MDA : Mail  우편함

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems With MTA you can… Send and receive an , of course –To users of your machine, without ISP –To other mail servers, you need connection to internet Fetch s from POP3 server –using fetchmail Receive s in right place –Using procmail Get messages from some programs via –Log files or security warnings can be delivered to your

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems A Lot of MTAs And Qmail, Courier, Smail, MMDF…

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems EXIM EXperimental Internet Mailer

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems EXIM One of the most popular MTAs Default MTA for Ubuntu SPARCS server GPL Flexible, extensible Good compatibility with Sendmail Latest stable release: 4.72 (2010/06/03)

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems How EXIM delivers mails? Internet SMTP(25) Daemon Mail server Spool Receiver Queue runner Delivery Remote Delivery Local Delivery Mailbox

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems Message ID 1OROMT-0003j0-6G The time at which the message started to be received. The number of seconds since the start of the epoch. TimeProcess ID ID of the process which received the message. Time Fractional part of the time of reception. The unit may be 1/2000 sec, 1/1000 sec, 1/200 sec or 1/100 sec.

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems Command line options # exim [options] [arguments] ––help Displays help message –bd Runs exim as a daemon, awaiting incoming SMTP connections from all available interfaces. Usually used with option –q. –q Starts one queue runner process. Time specifications start queue runner periodically. (–q30m for starting every 30 minutes)

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems Command line options # exim [options] [arguments] –Mc … Deliver messages in turn. Usually called internally by queue runner. –C Find configuration files in and apply them instead of default configuration file specified by CONFIGURE_FILE. –bP … Print the current configuration to standard output.

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems Let’s see SPARCS server ps aux | grep exim ? Ss Jul01 0:02 /usr/sbin/exim4 -bd -q30m Root ? S 18:14 0:00 /usr/sbin/exim4 -Mc 1OXW fL-QH ? S 18:14 0:00 /usr/sbin/exim4 -Mc 1OXW fL-QH ? S 18:14 0:00 /usr/sbin/exim4 -bd -q30m

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems Configuring EXIM EXIM configuration file is divided into 6 parts –ACL: Access control list for controlling incoming SMTP mails –Authenticators: Settings for authenticator drivers –Routers: Determines how the messages is to be delivered –Transports: Defines the mechanisms how the messages are to be copied –Retry: Rules for use when the message cannot be delivered immediately –Rewrite: Global address rewriting rules –Local_scan: Private options for local_scan() function Difficult?

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems /etc/exim4/update-exim4.conf.conf cat update-exim4.conf.conf # /etc/exim4/update-exim4.conf.conf # # Edit this file and /etc/mailname by hand and execute update-exim4.conf # yourself or use 'dpkg-reconfigure exim4-config' # # Please note that this is _not_ a dpkg-conffile and that automatic changes # to this file might happen. The code handling this will honor your local # changes, so this is usually fine, but will break local schemes that mess # around with multiple versions of the file. # # update-exim4.conf uses this file to determine variable values to generate # exim configuration macros for the configuration file. # # Most settings found in here do have corresponding questions in the # Debconf configuration, but not all of them. # # This is a Debian specific file

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems /etc/exim4/update-exim4.conf.conf dc_eximconfig_configtype='internet' dc_other_hostnames='sparcs.org;sparcs.net; ' dc_local_interfaces='' dc_readhost='' dc_relay_domains='' dc_minimaldns='false' dc_relay_nets='' dc_smarthost='' CFILEMODE='644' dc_use_split_config='true' dc_hide_mailname='' dc_mailname_in_oh='true' dc_localdelivery='maildir_home'

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems /etc/exim4/update-exim4.conf.conf dc_eximconfig_configtype='internet' dc_eximconfig_configtype : The main configuration type. ‘local’: Mails are sent and received between the accounts of local machine ‘internet’: Configure as a general server connected to internet ‘satellite’: Sends mail to another machine(smarthost) ‘smarthost’: Intermediates Sets macro DC_eximconfig_configtype.

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems /etc/exim4/update-exim4.conf.conf dc_other_hostnames='sparcs.org;sparcs.net; ' dc_other_hostnames : List of domains of mails that the server will finally accept Multiple values can be set, separated by colon(:). Mails delivered to will be passed from daemon process to receiver process.

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems /etc/exim4/update-exim4.conf.conf dc_local_interfaces='' dc_local_interfaces : List of IPs for daemon to listen on Multiple values can be set, separated by colon(:). Empty string means all interfaces.

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems /etc/exim4/update-exim4.conf.conf CFILEMODE='644' CFILEMODE : The octal file mode of the generated file Sets the mode of the files that are generated by update-exim4.conf.

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems /etc/exim4/update-exim4.conf.conf dc_use_split_config='true' dc_use_split_config : Defines whether it uses split configuration files ‘true’: Uses multiple files below /etc/exim4/conf.d ‘false’: Uses single file /etc/exim4/exim4.conf.template dc_localdelivery='maildir_home' dc_local_delivery : Name of default transport directory ‘’ or ‘mail_spool’: Mails are delivered to spool by default ‘maildir_home’: Mails are delivered to ~/Maildir/ by default

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems Update configuration # update-exim4.conf –d /etc/exim4 –o /etc/exim4/exim4.conf Automatically generates configuration files. # /etc/init.d/exim4 restart Restarts the daemon with new configuration.

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems Log files /var/log/exim4/mainlog /var/log/exim4/rejectlog

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems POSTFIX

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems POSTFIX One of the most popular MTAs IBM Public License(free) Secure alternative to Sendmail Able to handle large amounts of s Latest stable release: (2010/06/08)

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems Installation

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems /etc/postfix/main.cf cat main.cf # See /usr/share/postfix/main.cf.dist for a commented, more complete version # Debian specific: Specifying a file name will cause the first # line of that file to be used as the name. The Debian default # is /etc/mailname. myorigin = /etc/mailname smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no # appending.domain is the MUA's job. append_dot_mydomain = no # Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h readme_directory = no

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems /etc/postfix/main.cf # TLS parameters smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_use_tls=yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for # information on enabling SSL in the smtp client. myhostname = sparcs alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases mydestination = sparcs.org, sparcs.net, localhost.localdomain,, localhost relayhost = mynetworks = /8 [::ffff: ]/104 [::1]/128 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems /etc/postfix/main.cf # Debian specific: Specifying a file name will cause the first # line of that file to be used as the name. The Debian default # is /etc/mailname. myorigin = /etc/mailname myorigin : Specifies the domain that appears in mail that posted on this machine. /etc/mailname has sparcs.kaist.ac.kr in its first line, so specifying myorigin = /etc/mailname makes the sender of the mails outgoing from this machine like myorigin = $mydomain is one of the most generally used settings.

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems /etc/postfix/main.cf mynetworks_style = subnet mynetworks_style : Specifies what kinds of clients to relay mail from. host: Forwards mails from only the local machine subnet: Forwards mail from the clients in the same subnetwork as the machine class: Forwards mail from the clients in the same class as the machine If mynetworks_style is not set, you should specify the mynetworks list by hand.

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems /etc/postfix/main.cf mydestination = sparcs.org, sparcs.net, localhost.localdomain,, localhost mydestination : Specifies what domains this server will finally accept Multiple values can be set, separated by commas(,).

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems /etc/postfix/main.cf relayhost = relayhost : Specifies the delivery method (empty string): Deliver the mail directly to the internet $mydomain: Deliver mails via local mail server inet_interfaces = all inet_interfaces : Specifies what interfaces that daemon should listen on

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems Update configuration # postfix reload # /etc/init.d/postfix restart Restarting postfix daemon will apply your new settings

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems Log files /var/log/mail.log /var/log/mail.info /var/log/mail.err /var/log/mail.warn

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems ALIASES & FORWARDING

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems Aliases Alias is a way to use a virtual mail account –If webmaster is an alias of harry, messages sent to will be redirected to harry ’s mailbox. Alias is an easy way to configure mailing list –If wheel-seminar is aliases of all members who participates in wheel seminar, messages sent to will be redirected to their mailboxes. MTAs automatically reads alias database when the delivery process starts and deliver messages according to it.

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems /etc/aliases : –webmaster : harry : :include: –wheel-seminar : :include:/SPARCS/mail/aliases.d/wheel-seminar –Files is just a list of usernames separated by newlines. We have a good tool: edalias

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems newaliases MTAs read /etc/aliases.db, not /etc/aliases. You have to update database file after editing aliases files. # newaliases

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems Forwarding Pass messages to other mail addresses If harry forwards his mails to all mails sent to will be delivered to in fact.

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems Settings Alias –harry : /home/harry/.forward

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems Questions?

S ystem P rogrammers' A ssociation for R esearching C omputer S ystems Thank you!