AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 390959
Accepted
magiza83
magiza83
Asked: 2012-05-22 00:08:32 +0800 CST2012-05-22 00:08:32 +0800 CST 2012-05-22 00:08:32 +0800 CST

后缀中的中间队列

  • 772

我正在尝试使用 postfix + policyd/amavis + mysql 白名单/黑名单查找来实现邮件服务器。

问题是我想在它们之间有一个“中间”队列,以防其中一个失败,电子邮件不会被拒绝并保持在队列中,直到故障点恢复。

我的想法如下:

postfix(25) -> queue -> mysql white/blacklist lookups (RBL) -> queue -> policyd(10031)/amavis(10014) -> queue -> dspam(sock) -> postfix(10025)/relay

有了这个想法,如果其中一个“中间”点失败,我不会丢失任何电子邮件,所有电子邮件都将留在队列中。

我的配置是:main.cf

...
transport_maps = ldap:/etc/postfix/perditionMailhost_ldap
content_filter = amavisd-new:[127.0.0.1]:10024
...
smtpd_recipient_restrictions =
 reject_invalid_hostname,
 check_client_access mysql:/etc/postfix/client_whitelist
 check_sender_access mysql:/etc/postfix/sender_whitelist
 check_recipient_access mysql:/etc/postfix/recipient_whitelist
 reject_rbl_client multi.uribl.com,
 reject_rbl_client dsn.rfc-ignorant.org,
 reject_rbl_client dul.dnsbl.sorbs.net,
 reject_rbl_client list.dsbl.org,
 reject_rbl_client sbl-xbl.spamhaus.org,
 reject_rbl_client bl.spamcop.net,
 reject_rbl_client dnsbl.sorbs.net,
 reject_rbl_client cbl.abuseat.org,
 reject_rbl_client ix.dnsbl.manitu.net,
 reject_rbl_client combined.rbl.msrbl.net,
 reject_rbl_client rabl.nuclearelephant.com,
 check_policy_service inet:127.0.0.1:10031,
 permit_mynetworks,
 reject
smtpd_end_of_data_restrictions =
 check_policy_service inet:127.0.0.1:10031
smtpd_helo_required = yes
disable_vrfy_command = yes
invalid_hostname_reject_code = 554
non_fqdn_reject_code = 554
...

大师.cf

smtp      inet  n       -       n       -       200       smtpd -v
pickup    fifo  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       n       -       -       smtp
amavisd-new unix      -      -             n      -    2       smtp
        -o smtp_data_done_timeout=1200s
        -o disable_dns_lookups=yes
relay     unix  -       -       n       -       -       smtp
        -o smtp_fallback_relay=
        -o disable_dns_lookups=yes
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache
127.0.0.1:10025 inet     n       -       n       -       -       smtpd
        -o content_filter=
        -o local_recipient_maps=
        -o relay_recipient_maps=
        -o smtpd_restriction_classes=
        -o smtpd_client_restrictions=
        -o smtpd_helo_restrictions=
        -o smtpd_sender_restrictions=
        -o smtpd_recipient_restrictions=permit_mynetworks,reject
        -o mynetworks=127.0.0.0/8
        -o strict_rfc821_envelopes=yes

有什么帮助吗?甚至,我不确定这是否可能。

感谢和问候。

postfix queue
  • 1 1 个回答
  • 488 Views

1 个回答

  • Voted
  1. Best Answer
    DukeLion
    2012-05-22T03:02:52+08:002012-05-22T03:02:52+08:00

    您需要一个额外的 postfix smtp 实例,监听中间队列的不同端口。

    处理应该是这样的:

    1. 端口 25 上的 smtp 接收传入的电子邮件。
    2. 转发到 amavisd 的电子邮件消息,由 main.cf 中的 content_filter 指令选择
    3. amavisd 将电子邮件注入中间新的 smtp 进程,监听一些端口,例如 11025。您需要在 amavisd 配置中设置它:$forward_method = 'smtp:[127.0.0.1]:1025'; 中间 smtp 应该有 content_filer 指令,指向 dspam,

      127.0.0.1:11025      inet  n       -       n       -       -       smtpd
            -o content_filter=dspam:
      
    4. 应该有管道过程,让电子邮件做 dspam。
    5. dspam 将电子邮件发送到端口 10025 上的最后一个 smtp,并使用您已有的配置。
    • 1

相关问题

  • Postfix 在特定端口上接受邮件

  • 让 Postfix 以两种方式处理垃圾邮件

  • Postfix 或 exim:自动/程序化和转发电子邮件设置

  • 后缀电子邮件地址

  • 什么是最好的开源电子邮件解决方案包

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve