使用外部邮件后缀服务器在 Debian bookworm 上安装 mailman3

使用外部邮件后缀服务器在 Debian bookworm 上安装 mailman3

我想在我的 debian 盒子(bookworm)上安装 mailman3,但在另一台主机上使用已经存在的 postfix 邮件服务器(可以做到吗?)。

mailman.cfg我在文件中有以下设置/etc/mailman3

[mta]
# The class defining the interface to the incoming mail transport agent.
#incoming: mailman.mta.exim4.LMTP
incoming: mailman.mta.postfix.LMTP

# The callable implementing delivery to the outgoing mail transport agent.
# This must accept three arguments, the mailing list, the message, and the
# message metadata dictionary.
outgoing: mailman.mta.deliver.deliver

# How to connect to the outgoing MTA.  If smtp_user and smtp_pass is given,
# then Mailman will attempt to log into the MTA when making a new connection.
smtp_host: localhost
smtp_port: 25
smtp_user:
smtp_pass:

# Where the LMTP server listens for connections.  Use 127.0.0.1 instead of
# localhost for Postfix integration, because Postfix only consults DNS
# (e.g. not /etc/hosts).
lmtp_host: 127.0.0.1
lmtp_port: 8024

我有 SSH 隧道,使远程邮件服务器上的端口 25 可从我的邮递员服务器上使用,我的邮递员服务器上的端口 8024 可在远程邮件服务器上的端口 8024 上使用(如果这是要做的事情 - 对于第二部分,端口8024,我不完全确定我的理解是否正确)。

由于某些原因,当启动mailman3时,它会尝试执行postmap安装在邮件服务器上的程序,而不是安装在mailman服务器上的程序。我猜想,发生这种情况是因为incoming:和 的配置文件设置outgoing:

如何更改我的配置以使此设置正常工作?或者(如果这是不可能的):我应该如何配置我的系统以使新系统运行mailman3连接到现有的正在运行的服务器postfix

(我可能应该提到的是:邮件列表应该针对现有postfix邮件服务器负责的邮件域。)

答案1

您已更新mailman.cfg配置,并且已在两台服务器上启用 SMTP 和 LMTP 端口,但您错过了“传输映射”部分文档,这需要在Postfix中设置三个参数:transport_maps、local_recipient_maps和relay_domains。

这三个参数必须指向Mailman 根据添加到其中的域和列表生成并保持最新的文件postfix_domains和。它是通过您提到的实用程序postfix_lmtp来完成的。postmap

因此,您必须向 Postfix 配置添加三个参数,<var_dir>/data与 Postfix 服务器共享 Mailman 服务器中的文件夹,并向 Mailman 提供postmap实用程序以使此配置起作用。

可能还需要进行一些更改才能将该解决方案与您现有的 Postfix 配置集成。

相关内容