我希望将已有两年历史的高度配置的 sendmail 安装(当前在 AlmaLinux 9 上运行)转换为 postfix。其中的转换是将现有/etc/mail/access
文件调整为/etc/postfix/access
.
有些语句看起来可以直接复制,但如果可以的话请确认这一点:
# by default we allow relaying from localhost...
Connect:127.0.0.1 RELAY
# Allow systems on our DMZ to use this server.
Connect:123.44.55 RELAY
# Allow systems on our NAT network to use this server as well.
Connect:10.44 RELAY
# Accept mail sent to our domain.
To:company.example.com OK
# Forward any mail sent to our mailing-list server.
mailinglist.company.example.com RELAY
# Reject commonly-used non-existent addresses
From:[email protected] ERROR:5.7.1:550 Fake source address
From:[email protected] ERROR:5.7.1:550 Fake source address
From:[email protected] ERROR:5.7.1:550 Fake source address
From:[email protected] ERROR:5.7.1:550 Fake source address
# 28-Nov-2005: Too much spam is being relayed by these guys, and bounced to us.
Connect:66.155.233.70 ERROR:5.7.1:550 Your mail server is a spam relay
# 09-Jun-2016: Uber-bad domain list. There are almost no servers in these domains that do
# not send spam.
accountants ERROR:5.7.1:550 Domain used to send spam
bid ERROR:5.7.1:550 Domain used to send spam
# 09-Jun-2016: We've got a problem: When an unknown user receives
# email on our mail server, our mail server will reject mail
# to these users with "DSN: User unknown". This sounds fine, except
# that for aliases it sends a new email with that message back to the server
# that sent it. This results in "backscatter": our mail server starts
# sending mail from spammers back to bogus servers or forged
# addresses. The following is a list of user names completely retired
# from our mail server. It may not solve this problem, but it will
# hopefully reduce it.
To:aaron@ ERROR:550 No such user
To:betsy@ ERROR:550 No such user
我遇到困难的地方:Sendmail 允许我在每个系统或每个域的基础上设置邮件延迟和连接限制。我搜索了 postfix 文档,但我不知道如何做到这一点。
具体来说,如果我在 中包含以下语句/etc/mail/sendmail.mc
:
FEATURE(`greet_pause', `500') dnl
FEATURE(`ratecontrol', `nodelay', `terminate') dnl
define(`confCONNECTION_RATE_THROTTLE',`200') dnl
define(`confCONNECTION_RATE_WINDOW_SIZE',`60s') dnl
FEATURE(`conncontrol', `nodelay', `terminate') dnl
然后在 中/etc/mail/access
,我可以包含如下语句:
GreetPause:batchmanager.company.example.com 400
GreetPause:company.example.com 0
GreetPause:mailinglist.company.example.com 0
GreetPause:127.0.0.1 0
GreetPause:friend.other.com 20
GreetPause:friendly.other.gov 20
GreetPause:10.44 0
ClientRate:123.44.55.66 6000 # mailinglist
ClientRate:123.44.55.77 60 # batchmanager
ClientRate:127.0.0.1 0
ClientRate:123.44.55 60
ClientConn:123.44.55.77 5 # batchmanager
ClientConn:123.44.55.66 500 # mailinglist
还有一些远程站点的 TLS 配置似乎存在问题。或者也许是我们有问题,但只有这些网站选择检测并拒绝它。我在以下位置解决这个问题/etc/mail/access
:
Try_TLS:yetanother.different.com NO
我已经做过 RTFM,但没有运气。关于如何在 postfix 中实现这些功能有什么想法吗?