Sendmail E-Mail Services: 69-3 Nguyen Thi Nho, P9, Q.Tbinh, Tp. HCM
Sendmail E-Mail Services: 69-3 Nguyen Thi Nho, P9, Q.Tbinh, Tp. HCM
Sendmail E-Mail Services: 69-3 Nguyen Thi Nho, P9, Q.Tbinh, Tp. HCM
Sendmail
E-mail Services
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102
Objectives
Install sendmail
Configure sendmail
Recognize sendmail related files
Demonstrate how to use m4 processing
system
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102
sendmail
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102
Install and Configure
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102
sendmail.cf Main Sections
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102
Short Command Leters
C Defines classes of text
Ex: Cwlocalhost
D Defines macro
Ex: DnMAILER_DEAMON (my name for error
message)
M Defines mailers
Ex: Mprocmail, P=/usr/bin/procmail, F=DFMSPhnu9,
…
O Defines options
Ex: O MaxHopCount=17
R Defines rule sets to parse address(0, 3, …)
K Define database that contains text to search
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102
Local Info Section
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102
Local Info Section
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102
Local Info Section
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102
Local Info Section
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102
Local Info Section
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102
Options Options
Example :
Pfirst-class=0
Pspecial-delivery=100
Plist=-30
Pbulk=-60
Pjunk=-100
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102
Mailer Specification Section
Example :
Mprocmail P=/usr/bin/procmail F=DFMS
P Full path name of delivery program
F Specifies certain flags that tell sendmail more
about the delivery agent. Each flag is a single
character.
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102
The m4 Macro System
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102
Configure by using m4
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102
Mail Queued
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102
Steps to setup simple Mail Server
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102
Steps to setup simple Mail Server
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102
Steps to setup simple Mail Server
4) Modify sendmail.mc
Change :
dnl DAEMON_OPTIONS('Port=smtp,Addr=127.0.0.1,
Name=MTA')
LOCAL_DOMAIN(`localhost.localdomain')dnl
to :
DAEMON_OPTIONS('Port=smtp,Addr=0.0.0.0,
Name=MTA')
LOCAL_DOMAIN(`mail.example.org')dnl
Remember to run :
m4 ./sendmail.mc > /etc/mail/sendmail.cf
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102
Steps to setup simple Mail Server
4) Modify /etc/mail/sendmail.cf
Change :
Cwlocalhost
O DaemonPortOptions=Port=smtp,Addr=127.0.0.1,
Name=MTA
to :
Cwmail.example.org
O DaemonPortOptions=Port=smtp,Addr=0.0.0.0,
Name=MTA
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102
Steps to setup simple Mail Server
5) Modify /etc/mail/local-host-names
example.org
mail.example.org
6) Modify /etc/mail/access
example.org RELAY
mail.example.org RELAY
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102
Steps to setup simple Mail Server
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102
Steps to setup simple Mail Server
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102
Summary
Install sendmail
Configure sendmail
Recognize sendmail related files
Demonstrate how to use m4 processing
system
SAIGONLAB 83 Nguyễn
69-3 ThịThi
Nguyen Nhỏ,Nho,
P9, Q.Tân Bình, Tp.Tp.
P9, Q.TBinh, HCMHCM LPI 102