SlideShare a Scribd company logo
108.3-Mail Transfer Agent(MTA) basics
Topic 108
Essential System Services
Object 3: Mail
Transfer Agent (MTA) basics
5
‫سیستم‬ ‫یک‬ ‫اجزاء‬Mail
‫است‬ ‫شده‬ ‫تشکیل‬ ‫جزء‬ ‫چندین‬ ‫از‬
●MUA
●MTA
●MDA
Postfix The Definitive Guide, O'Reilly
6
MTA
‫مختلف‬ ‫های‬ ‫سازی‬‫پیاده‬
●Sendmail
–‫امنیتی‬ ‫مشکل ت‬ ‫و‬ ‫مشکل‬ ‫پیکربندی‬ ‫با‬ ،‫ها‬‫ترین‬ ‫قدیمی‬ ‫از‬ ‫یکی‬
●Postfix
–‫برای‬ ‫امن‬ ‫جایگزین‬ ‫و‬ ‫طرفدار‬ ‫پر‬ ‫سرویس‬ ‫یک‬sendmail
●Qmail
–‫شود‬‫می‬ ‫استفاده‬ ‫بسیار‬ ‫همچنان‬ ‫ولی‬ ،‫شده‬ ‫متوقف‬ ‫آن‬ ‫توسعه‬ ‫است‬ ‫مدتی‬
●Exim
–‫یک‬MTA‫برای‬ ‫قدرتمند‬ ‫و‬ ‫مناسب‬ ‫جایگزین‬ ‫و‬ ‫بسیارقوی‬sendmail‫بزرگ‬ ‫های‬ ‫سازی‬‫پیاده‬ ‫و‬
7
‫نامه‬ ‫یک‬ ‫ساختار‬
‫است‬ ‫اصلی‬ ‫بخش‬ ‫سه‬ ‫دارای‬ ‫نامه‬ ‫هر‬
●Header
–‫شامل‬To: , From‫و‬ :Subject‫از‬ ‫خالی‬ ‫خط‬ ‫یک‬ ‫با‬ ‫و‬ ‫شود‬ ‫خط‬ ‫چندین‬ ‫تواند‬‫می‬ ‫که‬ .‫است‬ :
body‫شود‬‫می‬ ‫جدا‬
●Body
–‫شماست‬ ‫نامه‬ ‫محتویا ت‬ ‫بخش‬ ‫این‬
●Envelop
–‫یا‬ ‫و‬ ‫تحویل‬ ‫برای‬ ‫بخش‬ ‫این‬ ‫محتویا ت‬ ‫از‬bounce‫محتویا ت‬ ‫نه‬ ‫و‬ ‫شود‬‫می‬ ‫استفاده‬header
8
Postfix
● Debian/Ubuntu
● RHEL/CentOS
# apt-get install postfix# apt-get install postfix
<<< install by default >>><<< install by default >>>
9
Postfix Config
● Minimal config
# vim /etc/postfix/main.cf
mydomain=cvak.ir
myhostname=$mydomain
mydestination=$domain $myhostname localhost localhost.localdomain
myorigin=$mydomain
inet_interfaces=all
mynetworks=127.0.0.1
# vim /etc/postfix/main.cf
mydomain=cvak.ir
myhostname=$mydomain
mydestination=$domain $myhostname localhost localhost.localdomain
myorigin=$mydomain
inet_interfaces=all
mynetworks=127.0.0.1
# systemctl restart postfix# systemctl restart postfix
10
alias
●‫یا‬ ‫و‬ ‫مجازی‬ ‫کاربر‬ ‫ایجاد‬forward‫دیگری‬ ‫به‬ ‫اکانت‬ ‫یک‬
# vi /etc/aliases
...
fakeaccount: behrad
root: behrad
behrad: behrad,b.eslamifar@cvak.ir
# vi /etc/aliases
...
fakeaccount: behrad
root: behrad
behrad: behrad,b.eslamifar@cvak.ir
# newaliases
# ls /etc/aliases*
/etc/aliases /etc/aliases.db
# newaliases
# ls /etc/aliases*
/etc/aliases /etc/aliases.db
11
forward.
●‫خود‬ ‫برای‬ ‫تواند‬‫می‬ ‫نیز‬ ‫کاربر‬ ‫هر‬forwarder‫کنید‬ ‫تعریف‬
$ vi ~/.forward
behrad_es@yahoo.com, user1
$ vi ~/.forward
behrad_es@yahoo.com, user1
12
‫ایمیل‬ ‫ارسال‬
● mail command
$ mail -s "exampl subject" behrad
Hi
This is test email
.
cc:
$ mail -s "exampl subject" behrad
Hi
This is test email
.
cc:
13
mailq
● mailq
● C527D43E7D* : Active queue
● C527D43E9A : Deferred queue
# mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
C527D43E7D* 289 Tue Sep 27 14:56:11 root@cvak.ir
behrad_es@yahoo.com
-- 0 Kbytes in 1 Request.
# mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
C527D43E7D* 289 Tue Sep 27 14:56:11 root@cvak.ir
behrad_es@yahoo.com
-- 0 Kbytes in 1 Request.
# sendmail -q (resend deferred email)# sendmail -q (resend deferred email)

More Related Content

PPTX
Money Laundering and Its Fall-out - REGULATION OF MONEY LAUNDERING: GLOBAL P...
PDF
Privacy in the usa Workplace
PDF
NCAT Solar Powered Air Conditioning - Is it a Viable Option? Antonio Chan
PPTX
Dnbd эффективные бизнес процессы власть доверие манипуляции
PPTX
Croс mba полезное и результативное совещание 27 октября 2016г
PPTX
NICSA Webinar | AML Enhanced Customer Due Diligence - "Beneficial Owner Rule"
PPTX
атопийн дерматит
PPTX
Урок 36 для 11 класу - Вибирання елементів з масиву за певним критерієм.
Money Laundering and Its Fall-out - REGULATION OF MONEY LAUNDERING: GLOBAL P...
Privacy in the usa Workplace
NCAT Solar Powered Air Conditioning - Is it a Viable Option? Antonio Chan
Dnbd эффективные бизнес процессы власть доверие манипуляции
Croс mba полезное и результативное совещание 27 октября 2016г
NICSA Webinar | AML Enhanced Customer Due Diligence - "Beneficial Owner Rule"
атопийн дерматит
Урок 36 для 11 класу - Вибирання елементів з масиву за певним критерієм.

Similar to 108.3-Mail Transfer Agent(MTA) basics (9)

PDF
Persian translation of Technology Infrastructure
PDF
پیگیری-مرسوله-پستی-از-طریق-کد-رهگیری.pdf
PDF
بررسی ایمیل های اسم و رفتار اسپم کننده ها
PDF
برای تحویل بسته از اداره پست چه مدارکی لازم است؟
PPT
Email security
PDF
Swift message reference guide
PDF
Mikrotik Voip Server
PPT
Email Security
PDF
چگونه کد مرسوله پستی خود را در سایت post.ir پیگیری کنیم؟
Persian translation of Technology Infrastructure
پیگیری-مرسوله-پستی-از-طریق-کد-رهگیری.pdf
بررسی ایمیل های اسم و رفتار اسپم کننده ها
برای تحویل بسته از اداره پست چه مدارکی لازم است؟
Email security
Swift message reference guide
Mikrotik Voip Server
Email Security
چگونه کد مرسوله پستی خود را در سایت post.ir پیگیری کنیم؟
Ad

More from behrad eslamifar (15)

PDF
320.1-Cryptography
PDF
200.1,2-Capacity Planning
PDF
00-Review of Linux Basics
PDF
Chapter 14 - ensuring integrity and availability
PDF
Chapter 12 - network security
PDF
Chapter 11 - voice and video over ip
PDF
Chapter 09 - network operating systems
PDF
Chapter 08 - wireless networking
PDF
Chapter 06 - network hardwares
PDF
Chaoter 05 - topologies and ethernet standards
PDF
Chapter 04 - introduction to tcpip protocols
PDF
Chapter 07 - wa ns and remote connectivity
PDF
Chapter 03 - Transmission basics and networking media
PDF
Chapter02 - network standard and osi model
PDF
Chapter 01 - Introduction to Network+
320.1-Cryptography
200.1,2-Capacity Planning
00-Review of Linux Basics
Chapter 14 - ensuring integrity and availability
Chapter 12 - network security
Chapter 11 - voice and video over ip
Chapter 09 - network operating systems
Chapter 08 - wireless networking
Chapter 06 - network hardwares
Chaoter 05 - topologies and ethernet standards
Chapter 04 - introduction to tcpip protocols
Chapter 07 - wa ns and remote connectivity
Chapter 03 - Transmission basics and networking media
Chapter02 - network standard and osi model
Chapter 01 - Introduction to Network+
Ad

108.3-Mail Transfer Agent(MTA) basics

  • 3. Object 3: Mail Transfer Agent (MTA) basics
  • 4. 5 ‫سیستم‬ ‫یک‬ ‫اجزاء‬Mail ‫است‬ ‫شده‬ ‫تشکیل‬ ‫جزء‬ ‫چندین‬ ‫از‬ ●MUA ●MTA ●MDA Postfix The Definitive Guide, O'Reilly
  • 5. 6 MTA ‫مختلف‬ ‫های‬ ‫سازی‬‫پیاده‬ ●Sendmail –‫امنیتی‬ ‫مشکل ت‬ ‫و‬ ‫مشکل‬ ‫پیکربندی‬ ‫با‬ ،‫ها‬‫ترین‬ ‫قدیمی‬ ‫از‬ ‫یکی‬ ●Postfix –‫برای‬ ‫امن‬ ‫جایگزین‬ ‫و‬ ‫طرفدار‬ ‫پر‬ ‫سرویس‬ ‫یک‬sendmail ●Qmail –‫شود‬‫می‬ ‫استفاده‬ ‫بسیار‬ ‫همچنان‬ ‫ولی‬ ،‫شده‬ ‫متوقف‬ ‫آن‬ ‫توسعه‬ ‫است‬ ‫مدتی‬ ●Exim –‫یک‬MTA‫برای‬ ‫قدرتمند‬ ‫و‬ ‫مناسب‬ ‫جایگزین‬ ‫و‬ ‫بسیارقوی‬sendmail‫بزرگ‬ ‫های‬ ‫سازی‬‫پیاده‬ ‫و‬
  • 6. 7 ‫نامه‬ ‫یک‬ ‫ساختار‬ ‫است‬ ‫اصلی‬ ‫بخش‬ ‫سه‬ ‫دارای‬ ‫نامه‬ ‫هر‬ ●Header –‫شامل‬To: , From‫و‬ :Subject‫از‬ ‫خالی‬ ‫خط‬ ‫یک‬ ‫با‬ ‫و‬ ‫شود‬ ‫خط‬ ‫چندین‬ ‫تواند‬‫می‬ ‫که‬ .‫است‬ : body‫شود‬‫می‬ ‫جدا‬ ●Body –‫شماست‬ ‫نامه‬ ‫محتویا ت‬ ‫بخش‬ ‫این‬ ●Envelop –‫یا‬ ‫و‬ ‫تحویل‬ ‫برای‬ ‫بخش‬ ‫این‬ ‫محتویا ت‬ ‫از‬bounce‫محتویا ت‬ ‫نه‬ ‫و‬ ‫شود‬‫می‬ ‫استفاده‬header
  • 7. 8 Postfix ● Debian/Ubuntu ● RHEL/CentOS # apt-get install postfix# apt-get install postfix <<< install by default >>><<< install by default >>>
  • 8. 9 Postfix Config ● Minimal config # vim /etc/postfix/main.cf mydomain=cvak.ir myhostname=$mydomain mydestination=$domain $myhostname localhost localhost.localdomain myorigin=$mydomain inet_interfaces=all mynetworks=127.0.0.1 # vim /etc/postfix/main.cf mydomain=cvak.ir myhostname=$mydomain mydestination=$domain $myhostname localhost localhost.localdomain myorigin=$mydomain inet_interfaces=all mynetworks=127.0.0.1 # systemctl restart postfix# systemctl restart postfix
  • 9. 10 alias ●‫یا‬ ‫و‬ ‫مجازی‬ ‫کاربر‬ ‫ایجاد‬forward‫دیگری‬ ‫به‬ ‫اکانت‬ ‫یک‬ # vi /etc/aliases ... fakeaccount: behrad root: behrad behrad: behrad,b.eslamifar@cvak.ir # vi /etc/aliases ... fakeaccount: behrad root: behrad behrad: behrad,b.eslamifar@cvak.ir # newaliases # ls /etc/aliases* /etc/aliases /etc/aliases.db # newaliases # ls /etc/aliases* /etc/aliases /etc/aliases.db
  • 10. 11 forward. ●‫خود‬ ‫برای‬ ‫تواند‬‫می‬ ‫نیز‬ ‫کاربر‬ ‫هر‬forwarder‫کنید‬ ‫تعریف‬ $ vi ~/.forward behrad_es@yahoo.com, user1 $ vi ~/.forward behrad_es@yahoo.com, user1
  • 11. 12 ‫ایمیل‬ ‫ارسال‬ ● mail command $ mail -s "exampl subject" behrad Hi This is test email . cc: $ mail -s "exampl subject" behrad Hi This is test email . cc:
  • 12. 13 mailq ● mailq ● C527D43E7D* : Active queue ● C527D43E9A : Deferred queue # mailq -Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient------- C527D43E7D* 289 Tue Sep 27 14:56:11 root@cvak.ir behrad_es@yahoo.com -- 0 Kbytes in 1 Request. # mailq -Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient------- C527D43E7D* 289 Tue Sep 27 14:56:11 root@cvak.ir behrad_es@yahoo.com -- 0 Kbytes in 1 Request. # sendmail -q (resend deferred email)# sendmail -q (resend deferred email)