qmail ~]# rpm -qa grep sendmail ps -ef grep sendmail root :30? 00:00:00 sendmail: accepting connections

Similar documents
jic.com mail is handled by 10 mail.jic.com. root]# host -t a mail.jic.com mail.jic.com has address

Secure Architecture Principles

Secure Architecture Principles

Secure Architecture Principles

Secure Architecture Principles

Secure Architecture Principles

Mail Server Setup using Sendmail on CentOS 5.8 Jeong Chul tland12.wordpress.com Computer Science ITC and RUPP in Cambodia

Course 144 Supplementary Materials. UNIX Fundamentals

ClamAV 설치 ( 큐잉서버 ) serverb

Please choose the best answer. More than one answer might be true, but choose the one that is best.

Linux Essentials Objectives Topics:

Exim Practical. Part 2 is running basic tests. You don t need to modify the Exim configuration to do this.

AfNOG 2003 Exim Practical

Secure Architecture Principles

Quick Start Guide. by Burak Himmetoglu. Supercomputing Consultant. Enterprise Technology Services & Center for Scientific Computing

GNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018

9.3 Linux?????????????

7.3 Linux?????????????

Introduction to Linux

Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester

UNIX Quick Reference

Building a secured open source mail system for Small Medium Enterprise (SME)

Table of Contents. VMailMgr HOWTO. VMailMgr HOWTO...1 Bruce Guenter Dan Kuykendall 1.Introduction...

Written by Muhammad Kamran Azeem Tuesday, 04 August :42 - Last Updated Sunday, 26 December :33

SIOS Protection Suite for Linux v Postfix Recovery Kit Administration Guide

7.3 Install on Linux and Initial Configurations

CHAPTER 1. Introducing qmail

minit Felix von Leitner September 2004 minit

Introduction to Unix May 24, 2008

Things you should know for the CTF

Using Fluentd as an alternative to Splunk

Obtaining and Installing the Updated TSBroadcaster Scripts

Introduction to Linux

CS246 Spring14 Programming Paradigm Notes on Linux

Quick Start Guide. by Burak Himmetoglu. Supercomputing Consultant. Enterprise Technology Services & Center for Scientific Computing

*nix Crash Course. Presented by: Virginia Tech Linux / Unix Users Group VTLUUG

Red Hat.Actualtests.EX200.v by.Dixon.22q. Exam Code: EX200. Exam Name: Red Hat Certified System Administrator (RHCSA) Exam

A Brief Introduction to Unix

Unix Handouts. Shantanu N Kulkarni

Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers

[ Terminal ] [ Users management ] Alt +F6 = Terminal switcher. useradd [option] JohnG

ITEC451 Network Design & Analysis Laboratory Guide: Appendix

Implementing a Primary Domain Controller for Windows 2000 Clients using Samba

Operating Systems. Copyleft 2005, Binnur Kurt

Introduction to Linux. Roman Cheplyaka

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing

02. At the command prompt, type usermod -l bozo bozo2 and press Enter to change the login name for the user bozo2 back to bozo. => steps 03.

Files

1.3 What does Ctrl-D, Ctrl-A, Ctrl-F and Ctrl-T do in terms of command line editing? (6)

Majordomo and MajorCool HOWTO

Introduction to Linux Workshop 1

EX200.Lead2pass.Exam.24q. Exam Code: EX200. Exam Name: Red Hat Certified System Administrator RHCSA. Version 14.0

Computer Systems and Architecture

Seltestengine EX200 24q

Introduction to Linux

ACS Unix (Winter Term, ) Page 92

Unix Workshop Aug 2014

Self-test Linux/UNIX fundamentals

LAB #7 Linux Tutorial

Unix Basics. UNIX Introduction. Lecture 14

Linux Training. for New Users of Cluster. Georgia Advanced Computing Resource Center University of Georgia Suchitra Pakala

CentOS6.5_x86_64 redis redis redis. Redis redis. redis slave server master server. redis. redis. redis. redis redis. replication.

Unix File System. Class Meeting 2. * Notes adapted by Joy Mukherjee from previous work by other members of the CS faculty at Virginia Tech

Computer Systems and Architecture

Processes are subjects.

Docker & why we should use it

Introduction to Linux

Week 2 Lecture 3. Unix

CISC 220 fall 2011, set 1: Linux basics

Operating systems fundamentals - B10

User Management. René Serral-Gracià Xavier Martorell-Bofill 1. May 26, Universitat Politècnica de Catalunya (UPC)

CST8207: GNU/Linux Operating Systems I Lab Seven Linux User and Group Management. Linux User and Group Management

COURIER IMAP + COURIERPASSD for Qmail

Aliases are set manually or in a login script. Aliases that were set manually will be gone the next time you login.

Introduction to the Linux Command Line

Unix Filesystem. January 26 th, 2004 Class Meeting 2

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions

Vendor: RedHat. Exam Code: EX200. Exam Name: Red Hat Certified System Administrator - RHCSA. Version: Demo

IBM Aspera Orchestrator Administrator Guide Version 2.3

EX200 Q&A. DEMO Version

Stop all processes and then reboot - same as above startx. Log in as superuser from current login exit

Mills HPC Tutorial Series. Linux Basics I

Outline. Structure of a UNIX command

d. 1 e. test: $a: integer expression expected

example.com index.html # vim /etc/httpd/conf/httpd.conf NameVirtualHost :80 <VirtualHost :80> DocumentRoot /var/www/html/

UNIX Quick Reference

Exercise Sheet 2. (Classifications of Operating Systems)

Privileges: who can control what

Read the relevant material in Sobell! If you want to follow along with the examples that follow, and you do, open a Linux terminal.

-1- csh cd. cd alias!! ; set prompt=" pwd % " 16 cd. 17 cd.. 18 his /home% set prompt. alias. yasuoka : root :

Build Your Own Oracle RAC 11g Release 2 Cluster on Red Hat 4 and iscsi

Linux Reference Card - Command Summary

National University of Computer and Emerging Sciences Operating System Lab - 02 Lab Manual

Lab 2: Linux/Unix shell

PHP. Downloading PHP. Uncompressing PHP. Unarchiving PHP

CS197U: A Hands on Introduction to Unix

Outline. UNIX security ideas Users and groups File protection Setting temporary privileges. Examples. Permission bits Program language components

Introduction to remote command line Linux. Research Computing Team University of Birmingham

Kurt Schmidt. October 12, 2018

Assume that username is cse. The user s home directory will be /home/cse. You may remember what the relative pathname for users home directory is: ~

Transcription:

qmail qmail (BSDs). qmail. 1-3 sendmail MTA MTA qmail. postfix :. rpm -qa grep sendmail sendmail -. [root@linuxcent ~]# rpm -qa grep sendmail sendmail-cf-8.13.8-8.el5 sendmail-8.13.8-8.el5. ps -ef grep sendmail sendmail MTA queue runner sendmail [root@linuxcent ~]# ps -ef grep sendmail. root 3025 1 0 05:30? 00:00:00 sendmail: accepting connections smmsp 3033 1 0 05:30? 00:00:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue - root 23380 32140 0 09:31 pts/1 00:00:00 grep sendmail

Qmail 38 chkconfig sendmail - root@linuxcent ~]# chkconfig --list sendmail. sendmail 0:off 1:off 2:on 3:on 4:on 5:on 6:off root@linuxcent ~]# chkconfig --level 2345 sendmail off root@linuxcent ~]# chkconfig --list sendmail sendmail 0:off 1:off 2:off 3:off 4:off 5:off 6:off service sendmail stop. sendmail - sendmail [root@linuxcent ~]# ps -ef grep sendmail. root 23439 32140 0 09:47 pts/1 00:00:00 grep sendmail [root@linuxcent ~]# netstat -ntlp grep 25 #[~ root@linuxcent]. 25 netstat - make gcc qmail -. root@linuxcent ~]# which gcc /usr/bin/gcc root@linuxcent ~]# which make /usr/bin/make

39 Qmail : qmail 2-3. 1998 1.03 qmail. netqmail qmail 1.06.. 2014 1 netqmail. www.qmail.org sendmail qmail. qmail 2 20 qmail. ucspi-tcp inetd/xinetd qmail. qmail daemon log daemontools qmail supervise svscan Daemontools. ucspi. daemontools. daemon log. ucspi netqmail 1.06 Maildir MTA qmail MTA Maildir mbox. qmail. mbox. MTA /var/spool/mail root@linuxcent qmail]# cd /var/spool/mail. 1 monolithic 2 delivery

Qmail 40 root@linuxcent mail]# ls hossein raja mohammad root rpc. sendmail qmail root mahdi. /etc/aliases root mahdi..forward.. qmail 3-3 http://qmail.org qmail. qmail 2-3 1-3. http://lifewithqmail.org. http://qmail.org :(1-3)

41 Qmail : http://lifewithqmail.org :(2-3) http://lifewithqmail.org qmail - download the source qmail, http://www.qmail.org/netqmail-1.06.tar.gz ucspi-tcp, http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz. : daemontools, http://cr.yp.to/daemontools/daemontools-0.76.tar.gz. /usr/local/src - mkdir -p /usr/local/src mv netqmail-1.06.tar.gz ucspi-tcp-0.88.tar.gz /usr/local/src mkdir -p /package mv daemontools-0.76.tar.gz /package chmod 1755 /package. -

Qmail 42 cd /usr/local/src gunzip netqmail-1.06.tar.gz tar xpf netqmail-1.06.tar gunzip ucspi-tcp-0.88.tar.gz tar xpf ucspi-tcp-0.88.tar rm *.tar # optional, unless space is very tight cd /package gunzip daemontools-0.76.tar.gz tar xpf daemontools-0.76.tar rm *.tar # optional, again. qmail - mkdir /var/qmail qmail netqmail 1-3-3. INSTALL.ids cd /usr/local/src/netqmail-1.06 cp INSTALL.ids IDS pw groupadd nofiles -.. freebsd pw useradd qmaild -g nofiles -d /var/qmail -s /nonexistent pw useradd alias -g nofiles -d /var/qmail/alias -s /nonexistent pw useradd qmaill -g nofiles -d /var/qmail -s /nonexistent

43 Qmail : pw useradd qmailp -g nofiles -d /var/qmail -s /nonexistent pw groupadd qmail pw useradd qmailq -g qmail -d /var/qmail -s /nonexistent pw useradd qmailr -g qmail -d /var/qmail -s /nonexistent pw useradd qmails -g qmail -d /var/qmail -s /nonexistent /bin/sh IDS. /sbin/nologin.. /etc/passwd vim /etc/passwd alias:x:503:504::/var/qmail/alias:/sbin/nologin qmaild:x:504:504::/var/qmail:/sbin/nologin qmaill:x:505:504::/var/qmail:/sbin/nologin qmailp:x:506:504::/var/qmail:/sbin/nologin qmailq:x:507:505::/var/qmail:/sbin/nologin qmailr:x:508:505::/var/qmail:/sbin/nologin qmails:x:509:505::/var/qmail:/sbin/nologin cd /usr/local/src/netqmail-1.06 make setup check./config : /etc/passwd : netqmail -./config-fast DNS qmail :

Qmail 44./config-fast the.full.hostname./config-fast raja.com : raja.com Your fully qualified host name is linuxcent.raja.com. Putting linuxcent.raja.com into control/me... Putting raja.com into control/defaultdomain... Putting raja.com into control/plusdomain... Putting linuxcent.raja.com into control/locals... Putting linuxcent.raja.com into control/rcpthosts... : Now qmail will refuse to accept SMTP messages except to raja.com. Make sure to change rcpthosts if you add hosts to locals or virtualdomains! : 1-3 /var/qmail/control :(1-3) none smtpd rcpthosts. FQDN of various me system me qmail-send locals. "+" me qmail-inject plusdomain me qmail-inject defaultdomain

45 Qmail : root@linuxcent daemontools-0.76]# cd /var/qmail/ root@linuxcent qmail]# ls alias bin boot control doc man queue users root@linuxcent qmail]# cd bin/ [root@linuxcent bin]# ls l total 900 -rwxr-xr-x 1 root qmail 9416 Jan 6 21:35 bouncesaying -rwxr-xr-x 1 root qmail 15788 Jan 6 21:35 condredirect -rwxr-xr-x 1 root qmail 126 Jan 6 21:35 datemail -rwxr-xr-x 1 root qmail 114 Jan 6 21:35 elq -rwxr-xr-x 1 root qmail 9292 Jan 6 21:35 except -rwxr-xr-x 1 root qmail 15304 Jan 6 21:35 forward -rwxr-xr-x 1 root qmail 20248 Jan 6 21:35 maildir2mbox -rwxr-xr-x 1 root qmail 8984 Jan 6 21:35 maildirmake -rwxr-xr-x 1 root qmail 17916 Jan 6 21:35 maildirwatch -rwxr-xr-x 1 root qmail 179 Jan 6 21:35 mailsubj -rwxr-xr-x 1 root qmail 115 Jan 6 21:35 pinq -rwxr-xr-x 1 root qmail 13064 Jan 6 21:35 predate -rwxr-xr-x 1 root qmail 13584 Jan 6 21:35 preline -rwxr-xr-x 1 root qmail 115 Jan 6 21:35 qail -rwxr-xr-x 1 root qmail 12176 Jan 6 21:35 qbiff -rwx--x--x 1 root qmail 11576 Jan 6 21:35 qmail-clean :

Qmail 46 -rwx--x--x 1 root qmail 6488 Jan 6 21:35 qmail-getpw -rwxr-xr-x 1 root qmail 37896 Jan 6 21:35 qmail-inject -rwx--x--x 1 root qmail 37984 Jan 6 21:35 qmail-local -rwx------ 1 root qmail 16828 Jan 6 21:35 qmail-lspawn -rwx------ 1 root qmail 15544 Jan 6 21:35 qmail-newmrh -rwx------ 1 root qmail 11956 Jan 6 21:35 qmail-newu -rwxr-xr-x 1 root qmail 20388 Jan 6 21:35 qmail-pop3d -rwx--x--x 1 root qmail 12144 Jan 6 21:35 qmail-popup -rwx--x--x 1 root qmail 17500 Jan 6 21:35 qmail-pw2u -rwxr-xr-x 1 root qmail 14200 Jan 6 21:35 qmail-qmqpc -rwxr-xr-x 1 root qmail 15532 Jan 6 21:35 qmail-qmqpd -rwxr-xr-x 1 root qmail 24796 Jan 6 21:35 qmail-qmtpd -rwxr-xr-x 1 root qmail 16460 Jan 6 21:35 qmail-qread -rwxr-xr-x 1 root qmail 371 Jan 6 21:35 qmail-qstat -rws--x--x 1 qmailq qmail 15740 Jan 6 21:35 qmail-queue -rwx--x--x 1 root qmail 28980 Jan 6 21:35 qmail-remote -rwx--x--x 1 root qmail 15740 Jan 6 21:35 qmail-rspawn -rwx--x--x 1 root qmail 42408 Jan 6 21:35 qmail-send -rwxr-xr-x 1 root qmail 16660 Jan 6 21:35 qmail-showctl -rwxr-xr-x 1 root qmail 29420 Jan 6 21:35 qmail-smtpd -rwx------ 1 root qmail 6336 Jan 6 21:35 qmail-start -rwxr-xr-x 1 root qmail 10680 Jan 6 21:35 qmail-tcpok -rwxr-xr-x 1 root qmail 10828 Jan 6 21:35 qmail-tcpto -rwxr-xr-x 1 root qmail 24356 Jan 6 21:35 qreceipt

47 Qmail : -rwxr-xr-x 1 root qmail 11820 Jan 6 21:35 qsmhook -rwxr-xr-x 1 root qmail 10900 Jan 6 21:35 sendmail -rwx--x--x 1 root qmail 6928 Jan 6 21:35 splogger -rwxr-xr-x 1 root qmail 20028 Jan 6 21:35 tcp-env ucspi-tcp 2-3-3 : ucspi-tcp cd /usr/local/src/ucspi-tcp-0.88 patch < /usr/local/src/netqmail-1.06/other-patches/ucspi-tcp- 0.88.errno.patch make make setup check daemontools 3-3-3 daemontools daemontools. : daemontools. supervise. supervise svc. log multilog. log

Qmail 48 GID UID superuser Setuidgid. cd /package/admin/daemontools-0.76 cd src : daemontools patch < /usr/local/src/netqmail-1.06/other-patches/daemontools- 0.76.errno.patch cd.. package/install : svscan root@linuxcent daemontools-0.76]# ps -ef grep svscan root 8692 1 0 22:09? 00:00:00 /bin/sh /command/svscanboot root 8694 8692 0 22:09? 00:00:00 svscan /service root 8700 4049 0 22:09 pts/1 00:00:00 grep svscan /etc/rc.local exec /command/svscanboot & : SV:123456:respawn:/command/svscanboot supervise : inittab svscan svcscan daemontools root@linuxcent command]# cd /command/ root@linuxcent command]# ls -la total 84 drwxr-xr-x 2 root root 4096 Jan 6 22:08. :.