顯示具有 exim 標籤的文章。 顯示所有文章
顯示具有 exim 標籤的文章。 顯示所有文章

2009年2月20日 星期五

SMTP protocol synchronization error (next input sent too soon: pipelining was not advertised)

在某些硬體spam 設備做將被隔離的信件撈回動作時, 會被exim 擋掉
錯誤訊息如下
SMTP protocol synchronization error (next input sent too soon: pipelining was not advertised)

可以將exim 的檢查選項關閉

default 是開啟的

在main configure 內

加入
smtp_enforce_sync = false

可避免再發生上敘問題

exim with DNS SPF

在exim 配置DNS SPF 檢查

在EXIM 上的應用在exim configure acl sector 加入

acl_check_rcpt:
#...

# Use spfquery to perform a pair of SPF checks (for details, see
# http://www.openspf.org/)
#
# This is quite costly in terms of DNS lookups (~6 lookups per mail). Do not
# enable if that's an issue. Also note that if you enable this, you must
# install "libmail-spf-query-perl" which provides the spfquery command.
# Missing libmail-spf-query-perl will trigger the "Unexpected error in
# SPF check" warning.

deny
message = [SPF] $sender_host_address is not allowed to send mail from \
${if def:sender_address_domain {$sender_address_domain}{$sender_helo_name}}. \
Please see http://www.openspf.org/why.html?sender=$sender_address&ip=$sender_host_address
log_message = SPF check failed.
condition = ${run{/usr/bin/spfquery --ip \"$sender_host_address\" \
--mail-from \"$sender_address\" --helo \"$sender_helo_name\"} \
{no}{${if eq {$runrc}{1}{yes}{no}}}}

defer
message = Temporary DNS error while checking SPF record. Try again later.
condition = ${if eq {$runrc}{5}{yes}{no}}

warn
message = Received-SPF: ${if eq {$runrc}{0}{pass}{${if eq {$runrc}{2}{softfail}\
{ ${if eq {$runrc}{3}{neutral}{${if eq {$runrc}{4}{unknown}\
{${if eq {$runrc}{6}{none}{error}}}}}}}}}}
condition = ${if le {$runrc}{6}{yes}{no}}

warn
log_message = Unexpected error in SPF check.
condition = ${if gt {$runrc}{6}{yes}{no}}

# Support for best-guess (see http://www.openspf.org/developers-guide.html)
warn
message = X-SPF-Guess: ${run{/usr/bin/spfquery --ip \"$sender_host_address\" \
--mail-from \"$sender_address\" \ --helo \"$sender_helo_name\" --guess true}\
{pass}{${if eq {$runrc}{2}{softfail}{${if eq {$runrc}{3}{neutral}{${if eq {$runrc}{4}{unknown}\
{${if eq {$runrc}{6}{none}{error}}}}}}}}}}
condition = ${if le {$runrc}{6}{yes}{no}}

defer
message = Temporary DNS error while checking SPF record. Try again later.
condition = ${if eq {$runrc}{5}{yes}{no}}[img][/img]

簡單來說

DNS SPF record 應先配置在dns server 上

而DNS SPF check 則應在該機制成熟後加入,減少spam 信件

exim with maildir

platform :centos 5 , exim 4.69
begin routers 區段

localuser:
driver = accept
check_local_user
# local_part_suffix = +* : -*
# local_part_suffix_optional
transport = maildir_delivery
cannot_route_message = Unknown user

begin transports 區段

maildir_delivery:
driver = appendfile
directory = /home/$local_part/maildir
delivery_date_add
envelope_to_add
return_path_add
maildir_format
check_string =


restart exim services .

log

2008-09-02 13:23:07 1KaOM7-0001P7-Bc <= lalala@mail.abc.com.tw H=mail.proeurotex.com.tw [123.123.123.123] P=esmtp S=823 id=200809020523.m825NCvl022516@mail.abc.com.tw
2008-09-02 13:23:07 1KaOM7-0001P7-Bc => admin R=localuser T=maildir_delivery
2008-09-02 13:23:07 1KaOM7-0001P7-Bc Completed

驗證一下 , 使用者家目錄

產生了maidlr 此目錄 內有cur new tmp 目錄

在new 目錄

1220332987.H475850P5403.andrew.usnei.net

在imap pop3 server 我使用dovecot

在 /etc/dovecot.conf 內

加入

mail_location = maildir:~/maildir

如果要使用ipop3 的話 ,

我不確定有沒有支援

同時我也不建議, ipop3 基本上已經過時了

dovecot 支援較多的功能

效能也一直隨著版本更新改善