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 / 问题 / 1053645
Accepted
francisaugusto
francisaugusto
Asked: 2021-02-15 12:38:06 +0800 CST2021-02-15 12:38:06 +0800 CST 2021-02-15 12:38:06 +0800 CST

指定用户执行 spamc 时,Postfix/spamassassin 未传递给别名

  • 772

我已经安装了 SpamAssassin 并将其配置为从 sql 读取首选项。我意识到它没有读取用户的首选项,并检查了我看到spamc客户端发送的所有请求都作为 spamd 用户执行的日志。

这是 spamc 客户端如何按照master.cf文件中的配置执行(后缀):

spamassassin unix -     n       n       -       -       pipe
        user=spamd argv=/usr/bin/spamc  -f -e
        /usr/sbin/sendmail -oi -f ${sender} ${recipient}

我添加-u ${recipient}到 spamc,并在日志中看到它有效,现在用户的首选项已正确获取。

但是,这种方式会破坏我对别名的传递。

考虑[email protected]成为[email protected]和 to的后缀别名[email protected]。添加上述内容-u会spamc导致电子邮件无法发送到别名。

当它不发送电子邮件时,这里有很多后缀:

Feb 14 21:12:36 mail postfix/qmgr[51620]: 6EFD11003F5: from=<[email protected]>, size=2588, nrcpt=2 (queue active)
Feb 14 21:12:37 mail postfix/pipe[51637]: 6EFD11003F5: to=<[email protected]>, orig_to=<[email protected]>, relay=spamassassin, delay=1.3, delays=0.03/0/0/1.3, dsn=2.0.0, status=sent (delivered via spamassassin service (X-Spam-Level:  X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,SPF_HELO_PASS  autolearn=ha))
Feb 14 21:12:37 mail postfix/pipe[51637]: 6EFD11003F5: to=<[email protected]>, orig_to=<[email protected]>, relay=spamassassin, delay=1.3, delays=0.03/0/0/1.3, dsn=2.0.0, status=sent (delivered via spamassassin service (X-Spam-Level:  X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,SPF_HELO_PASS  autolearn=ha))
Feb 14 21:12:37 mail postfix/qmgr[51620]: 6EFD11003F5: removed

我删除了-u ${recipient}, 事情又可以工作了,但我无法从以下日志中找到太多帮助:

Feb 14 21:14:36 mail postfix/master[51877]: daemon started -- version 3.4.13, configuration /etc/postfix
Feb 14 21:15:26 mail postfix/qmgr[51880]: B9C531003F5: from=<[email protected]>, size=2580, nrcpt=2 (queue active)
Feb 14 21:15:27 mail postfix/pipe[51932]: B9C531003F5: to=<[email protected]>, orig_to=<[email protected]>, relay=spamassassin, delay=1.2, delays=0.04/0.01/0/1.1, dsn=2.0.0, status=sent (delivered via spamassassin service)
Feb 14 21:15:27 mail postfix/pipe[51932]: B9C531003F5: to=<[email protected]>, orig_to=<[email protected]>, relay=spamassassin, delay=1.2, delays=0.04/0.01/0/1.1, dsn=2.0.0, status=sent (delivered via spamassassin service)
Feb 14 21:15:27 mail postfix/qmgr[51880]: B9C531003F5: removed
Feb 14 21:15:27 mail postfix/qmgr[51880]: E19B7106C31: from=<[email protected]>, size=2969, nrcpt=2 (queue active)
Feb 14 21:15:28 mail postfix/qmgr[51880]: 01875106C30: from=<[email protected]>, size=3336, nrcpt=1 (queue active)

spamassassin 日志,当它不起作用时,是这些:

Sun Feb 14 21:12:36 2021 [50514] info: spamd: processing message <[email protected]> for [email protected]:5000
Sun Feb 14 21:12:36 2021 [50514] info: dns: no callback for id 21026/IN/A/bluetreehotels.com.br.dbl.spamhaus.org, ignored, packet on next debug line
Sun Feb 14 21:12:36 2021 [50514] info: dns: no likely matching queries for id 21026
Sun Feb 14 21:12:37 2021 [51696] info: util: setuid: ruid=5000 euid=5000 rgid=5000 5000 5000 egid=5000 5000 5000
Sun Feb 14 21:12:37 2021 [50514] info: spamd: clean message (-1.9/3.0) for [email protected]:5000 in 1.3 seconds, 2502 bytes.
Sun Feb 14 21:12:37 2021 [50514] info: spamd: result: . -1 - BAYES_00,SPF_HELO_PASS scantime=1.3,size=2502,[email protected],uid=5000,required_score=3.0,rhost=127.0.0.1,raddr=127.0.0.1,rport=43164,mid=<[email protected]>,bayes=0.000000,autolearn=ham autolearn_force=no
Sun Feb 14 21:12:37 2021 [50512] info: prefork: child states: II

当它工作正常时,如下所示:

Sun Feb 14 21:15:26 2021 [50514] info: spamd: connection from 127.0.0.1 [127.0.0.1]:43402 to port 783, fd 5
Sun Feb 14 21:15:26 2021 [50514] info: spamd: processing message <[email protected]> for spamd:5000
Sun Feb 14 21:15:26 2021 [51934] info: util: setuid: ruid=5000 euid=5000 rgid=5000 5000 5000 egid=5000 5000 5000
Sun Feb 14 21:15:27 2021 [50514] info: spamd: clean message (-0.0/5.0) for spamd:5000 in 1.1 seconds, 2494 bytes.
Sun Feb 14 21:15:27 2021 [50514] info: spamd: result: . 0 - SPF_HELO_PASS scantime=1.1,size=2494,user=spamd,uid=5000,required_score=5.0,rhost=127.0.0.1,raddr=127.0.0.1,rport=43402,mid=<[email protected]>,autolearn=ham autolearn_force=no

关于为什么会发生这种情况的任何线索?这里明显的区别是,在 spamassassin 日志上,当它不起作用时,我们看到它spamc是由用户调用的[email protected](而不是 with[email protected]和 not with [email protected])。别名所代表的收件人都没有收到电子邮件。在第二次尝试时,没有-u参数,然后 spamc 被执行而不发送用户名(失败进入默认spamd用户),并且邮件被传递给用户a和b.

可以sendmail吗?

最好的,

弗朗西斯

postfix spamassassin
  • 1 1 个回答
  • 158 Views

1 个回答

  • Voted
  1. Best Answer
    francisaugusto
    2021-02-15T23:55:40+08:002021-02-15T23:55:40+08:00

    我想我修好了。添加spamassassin_destination_recipient_limit = 1到main.cf(后缀)就可以了。

    • 0

相关问题

  • 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