登录 主页

iredmail 邮箱系统发送邮件报错了:SMTP 错误 (451): 添加收件人失败 "test@gamil.com" (4.3.5 <test@gamil.com>: Recipient address rejected: Server configuration problem)。

2025-11-13 10:27AM

我在我的服务器上面搭建了iredmail邮箱系统,在尝试发送邮件的时候,发现报错了:SMTP 错误 (451): 添加收件人失败 "test@gamil.com" (4.3.5 <test@gamil.com>: Recipient address rejected: Server configuration problem)。

在iRedMail系统中遇到的SMTP 451错误,通常与邮件服务器的策略服务(如iRedAPD或Cluebringer/cbpolicyd)未正常运行有关

解决方法:

1. 检查邮箱日志:

日志文件通常是:/var/log/mailog

$ grep "451 4.3.5" /var/log/maillog

root@mail:~# grep "451 4.3.5" /var/log/maillog

Nov 13 10:01:30 mail postfix/submission/smtpd[3568828]: NOQUEUE: reject: RCPT from mail.bida.exchange[127.0.0.1]: 451 4.3.5 <test@gmail.com>: Recipient address rejected: Server configuration problem; from=<postmaster@test.com> to=<test@gmail.com> proto=ESMTP helo=<localhost>

Nov 13 10:01:39 mail postfix/submission/smtpd[3568828]: NOQUEUE: reject: RCPT from mail.bida.exchange[127.0.0.1]: 451 4.3.5 <test@gmail.com>: Recipient address rejected: Server configuration problem; from=<postmaster@test.com> to=<test@gmail.com> proto=ESMTP helo=<localhost>

Nov 13 10:01:44 mail postfix/submission/smtpd[3568828]: NOQUEUE: reject: RCPT from mail.bida.exchange[127.0.0.1]: 451 4.3.5 <test@gmail.com>: Recipient address rejected: Server configuration problem; from=<postmaster@test.com> to=<test@gmail.com> proto=ESMTP helo=<localhost>

可以发现日志中存在 connect to 127.0.0.1:10031: Connection refused 或 problem talking to server 127.0.0.1:10031 的错误,这明确指出了Postfix无法连接到监听在10031端口的策略服务,这通常是 cbpolicyd 或 iredapd。

2. 检查启动相关服务:

2.1 使用 iRedAPD 的系统(较新版,我就使用的这个解决了方法,因为我搭建的iRedmail是最新版本的)

检查状态:systemctl status iredapd

root@mail:~# systemctl status iredapd
○ iredapd.service - iRedAPD (A simple posfix policy server)
     Loaded: loaded (/lib/systemd/system/iredapd.service; enabled; vendor preset: enabled)
     Active: inactive (dead)

启动服务:systemctl start iredapd

root@mail:~# systemctl status iredapd
○ iredapd.service - iRedAPD (A simple posfix policy server)
     Loaded: loaded (/lib/systemd/system/iredapd.service; enabled; vendor preset: enabled)
     Active: inactive (dead)
root@mail:~# systemctl start iredapd
root@mail:~# systemctl status iredapd
● iredapd.service - iRedAPD (A simple posfix policy server)
     Loaded: loaded (/lib/systemd/system/iredapd.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2025-11-13 10:09:49 CST; 1s ago
    Process: 3572794 ExecStart=/usr/bin/python3 /opt/iredapd/iredapd.py (code=exited, status=0/SUCCESS)
   Main PID: 3572805 (python3)
      Tasks: 1 (limit: 4646)
     Memory: 40.8M
        CPU: 558ms
     CGroup: /system.slice/iredapd.service
             └─3572805 /usr/bin/python3 /opt/iredapd/iredapd.py

Nov 13 10:09:49 mail.bida.exchange python3[3572794]: iredapd Loading plugin (priority: 80): greylisting
Nov 13 10:09:49 mail.bida.exchange python3[3572794]: iredapd Loading plugin (priority: 60): throttle
Nov 13 10:09:49 mail.bida.exchange python3[3572794]: iredapd Loading plugin (priority: 51): sql_ml_access_policy
Nov 13 10:09:49 mail.bida.exchange python3[3572794]: iredapd Loading plugin (priority: 50): sql_alias_access_policy
Nov 13 10:09:49 mail.bida.exchange python3[3572794]: iredapd Loading plugin (priority: 40): amavisd_wblist
Nov 13 10:09:49 mail.bida.exchange python3[3572794]: iredapd Starting SRS sender rewriting channel, listening on 127.0.0.1:7778
Nov 13 10:09:49 mail.bida.exchange python3[3572794]: iredapd Starting SRS recipient rewriting channel, listening on 127.0.0.1:7779
Nov 13 10:09:49 mail.bida.exchange systemd[1]: iredapd.service: Can't open PID file /run/iredapd.pid (yet?) after start: Operation not permitted
Nov 13 10:09:49 mail.bida.exchange systemd[1]: iredapd.service: Supervising process 3572805 which is not our child. We'll most likely not notice when it exits.
Nov 13 10:09:49 mail.bida.exchange systemd[1]: Started iRedAPD (A simple posfix policy server).

设置自开机:systemctl start iredapd

root@mail:~# systemctl enable iredapd
root@mail:~# 

2.2 对于iRedmail较旧版本的解决方法

检查状态

systemctl status cbpolicyd
# 或者
systemctl status cluebringer

启动服务(如果没有运行)

systemctl start cbpolicyd

设置开机自启

systemctl enable cbpolicyd

3. 验证解决方案

systemctl status iredapd   # 或者 cbpolicyd

我使用了2.1的方法,修改之后,邮箱系统就可以正常发送邮件了

 

返回>>

登录

请登录后再发表评论。

评论列表:

目前还没有人发表评论