CentOS 安裝Postfix 紀錄

因為工作關係,常會使用到各家不同的Mail System ,剛好藉這次機會把我自己常安裝的Postfix 給記錄起來,以後要查詢也很方便。

主要步驟如下:
1.安裝更新Postfix及相關套件
2.調整Postfix參數

1.安裝更新Postfix及相關套件

#yum update postfix openssl
#yum install cyrus-sasl cyrus-sasl-plain cyrus-sasl-md5 telnet wget

安裝RPMforge (範例是安裝64bit)

#rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
#wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
#rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

安裝Postgrey (灰名單套件)

#yum install postgrey

確認是否運作

#postfix status

查看Postfix 版本

#postconf  | grep mail_version

查看saslauthd 版本 & 密碼管理機制

#saslauthd -v

2.調整Postfix參數
使用postconf 調整/etc/postfix/main.cf 參數內容,我常用的參數如下:

參數值 說明
基本參數設定
myhostname Postfix 發送主機名稱 在HELO時會使用到
mydomain Postfix 發送主機網域名稱
myorigin 郵件中Mail From欄位,通常與mydomian 參數相同既可
mydestination Postfix 中要接收的郵件網域(Inbound)名稱
inet_interfaces Listen IP,預設localhost
mynetworks 指定IP可做信件relay,預設 127.0.0.0/8
smtpd_banner SMTP 歡迎訊息
smtpd_timeout SMTP 逾時設定,預設300秒
transport_maps 指定網域信件(Inbound)丟到下一台Mail Server
relayhost 指定外寄信件(Outbound) 丟到一下台Mail Server (Smart Host)
always_bcc 自動備份信件到某一信箱,預設無此設定
smtpd_recipient_limit 限制一封信件最多能有多少收件人,預設1000
message_size_limit 單封信件容量大小,預設10MB
mailbox_size_limit 使用者信箱容量大小
header_size_limit 郵件表頭容量大小
Queue 佇列參數設定
maximal_queue_lifetime Queue 信存活時間,超過時間則退回原寄件者,預設5天
queue_run_delay 預設每300秒掃描一次deferred queue內的信件
minimal_backoff_time 預設最少停留300秒後會retry deferred queue內信件
maximal_backoff_time 預設最大停留4000秒後會retry deferred queue內信件
基本安全性參數設定
disable_vrfy_command 是否關閉vrfy 指令,預設關閉
smtpd_soft_error_limit 預設SMTP指令錯誤10次時,暫停連線一段時間
smtpd_error_sleep_time 暫停連線時間,預設1秒
smtpd_hard_error_limit 預設SMTP指令錯誤20次時,直接斷線
strict_rfc821_envelopes RFC821要求mail from & rcpt to指令必須要有<>符號,預設關閉
smtpd_helo_required SMTP交涉時,是否要HELO or EHLO 預設關閉
SMTP HELO限制smtpd_helo_restrictions 預設不存在
reject_invalid_helo_hostname 拒絕不正確的HELO hostname
reject_unknown_helo_hostname 拒絕HELO hostname 沒有MX或A 紀錄
SMTP 寄件者限制 smtpd_sender_restrictions預設不存在
check_sender_access 檢查寄件者或寄件網域
reject_sender_login_mismatch 拒絕SASL帳號與Mail From帳號不同
reject_unknown_sender_domain 拒絕Mail From網域沒有MX 或 A紀錄
SMTP 收件者限制 smtpd_recipient_restrictions
permit_mynetworks 預設值,允許來自mynetworks設定來源
reject_unauth_destination 不允許未認證進行relay
reject_rbl_client 使用RBL組織進行過濾來源IP
Facebook Comments
machine rape hentai hentaihug.com read hentai magna
ladki chodna pornude.mobi bluefilm com video
hindi video new pornozavr.me gora aur kala
نيك عنيف مترجم 24h-porn.net ينيكها وهي نايمه
يشبفسثء freebigassporn.org فيلم اجنبى قليل الادب
elizabeth olsen bf blondeporntrends.com malayalam sexi
chudai karwai indiandesiclips.com bhabisex.com
haryana village sex video ganstagirls.net wwwxnxcom
bf sexy vidio indiantubetv.com bhaagamathie songs naa songs
open sex free brownporntube.info open dance
bp hd sexy palimas.mobi xexi movie
malayalifuck dunato.mobi sex vedios malayalam
sexy film video hindi mai collegeporntrends.com tamilplay.com 2015 movies download
hot romantic sex porn alohaporn.net xnxx japnese
دانا فسبولى arabicaporn.com مصريه متناكه