1. 程式人生 > >郵件服務

郵件服務

caller qmail smtp服務 ger con 一個 需要 sha outlook

SMTP:Simple Mail Transfer Protocol(監聽端口:25/TCP)

SMTPs:(監聽端口:465/TCP)

ESMTP:Extended SMTP

POP3:Post Office Protocol(監聽端口:110/TCP)

POP3s:(監聽端口 995/TCP)

IMAP4:Internet Mail Access Protocol(監聽端口:143/TCP)

IMAPs:( 監聽端口 993/TCP)

UUCP:Unix to Unix Copy

Unix主機復制文件的協議


MUA:Mail User Agent,郵件用戶代理

Outlook Express,Outlook

Foxmail

Thunderbird

Evolution

mutt(文本界面)

MTA:Mail Transfer Agent,郵件傳輸代理,SMTP服務器

sendmail,UUCP

單體結構,SUID,配置文件語法(m4編寫)

qmail

postfix:模塊化設計,安全,跟sendmail兼容,效率高

exim:MTA

Exchange(Windows,異步消息協作平臺)

MDA:Mail Delivery Agent,郵件投遞代理

procmail

maildrop

MRA:Mail Retrieval Agent,郵件檢索代理(pop3,imap4)

eyrus-imap

dovecot

LDAP:Lightweight Directory Access Protocol,輕量級目錄訪問協議


Webmail:郵箱服務程序

Openwebmail

squirrelmail

Extmail(Extman)


postfix默認把本機的IP地址所在的網段識別為本地網絡,並且為之中繼郵件

postfix的配置文件:

postfix模塊化:

master:/etc/postfix/master.cf

mail:/etc/postfix/main.cf

參數=值:參數必須寫在行的絕對行首,以空白開頭的行被認為是上一行的延續

pstconf:配置postfix

-d:顯示默認的配置

-n:顯示修改了的配置

-m:顯示支持的查找表類型

-A:顯示支持的SASL客戶端插件類型

-e PARMATER=VALUE:更改某參數配置信息,並保存至main.cf文件中


smtp狀態碼:

1xx:純信息

2xx:正確信息

3xx:上一步操作尚未完成,需要繼續補充

4xx:暫時性錯誤

5xx:永久性錯誤

smtp協議命令:

helo(smtp協議) [****host]

ehlo(esmtp協議) [****host]

mail from:發件人

rcpt to:收件人

data

subject: [******]

[***正文****]

. (以點結束發送內容)

quit (結束郵件)


alias:郵件別名

[email protected]: [email protected]

# newaliases (/etc/aliases --> hash --> /etc/aliases.db)


dovecot依賴mysql客戶端,支持四種協議:pop3,imap4,pop3s,imaps

配置文件:/etc/dovecot.conf

protocols = [pop3] [pop3s] [imap4] [imaps]

有SASL認證能力

郵箱格式:

mbox:一個文件存儲所有郵件(默認)

maildir:一個文件存儲一封郵件,所有文件存儲在一個目錄中


# mutt -f PROTOCOL://username@***.com@IP (接收或回復郵件)


postfix + SASL 用戶認證

1、啟用sasl,啟動sasl服務

# saslauthd -v (顯示當前主機saslauthd服務所支持的認證機制,默認為pam)


【 postfix + sasl + courier-authlib + MySQL(實現了虛擬用戶、虛擬域) + dovecot + Webmail {extmail(extmain)} 】


ssl:SMTP,POP3,IMAP4(plaintext:純文本)

http --> https(ssl/tls)

smtp --> smtps,25 --> 465

S/MIME(security USER <--> USER)

用戶證書:mail,hash(finger print)

OpenSSL,GPG(PGP)

PKI:CA


※※※

協議報文分析器:

sniffer:商業工具

tcpdump

tcpdump [options] 過濾條件

# tcpdump [options] [Protocol] [Direction] [Host(s)] [Value] [Logical Operations] [Other expression]

Protocol(協議):ether,fddi,ip,arp,rarp,decnet,lat,sca,moprc,mopdl,tcp and udp

Direction(流向):src,dst,src and dst,src or dst

Host(s)(主機):net,port,host(默認),portrange

Value:關鍵字

Logical Operations:AND(and or &&)、OR(or or ||)、EXCEPT(not or !)

wireshark(GUI)

tshark(CLI)


maildrop:MDA,Courier組件,郵件投遞

Postfix系統組件:

RBL:Realtime Black List,實時黑名單

內容過濾器:

APACHE:Spamassassin

Perl:垃圾郵件分揀器(特征碼)

病毒郵件:

clamav:開源殺毒軟件

病毒郵件服務器網關

呼叫器:caller

MIMEDefang,Mailscanner,Amavisd-new


郵件服務