Mailman 2 到 3 迁移后配置 postfix

Mailman 2 到 3 迁移后配置 postfix

我是 Postfix 新手。也许有人可以指导我找到解决方案。

我按照官方网站,一切都正确导入了。但是,我发现列表在新版本中对我不起作用。用户发送的电子邮件未得到处理。只有确认电子邮件被正确发送。旧邮递员仍然正确处理一切。顺便说一下,它们在同一个实例上(Ubuntu 18.04)。

如果我理解正确的话,我需要以某种方式更改 postfix 配置。

我生成了新的列表和别名数据库:

/var/lib/mailman3/data# mailman aliases 
/var/lib/mailman3/data# cat postfix_lmtp

# Aliases which are visible only in the @ xxxx.xxxxx.com domain.
[email protected] lmtp: [127.0.0.1]: 8024
.......
.......
.....

然后通过 postmap 添加一个具有新别名的文件

#postmap /var/lib/mailman3/data/postfix_lmtp

之后,我在 main.cf 中的 alias_maps 和 ailas_database 中添加了带有别名的新文件

smtpd_banner = $ myhostname ESMTP $ mail_name (Ubuntu)
biff = no

append_dot_mydomain = no

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination

readme_directory = no

# TLS parameters
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree: ${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree: ${data_directory}/smtp_scache

myhostname = xxx.xxxx.com
alias_maps = hash:t/etc/aliases, hash:/var/lib/mailman3/data/postfix_lmtp
alias_database = hash:/etc/aliases, hash:/var/lib/mailman3/data/postfix_lmtp.db
myorigin = /etc/mailname
mydestination = xxxxxxxxx.xxxxxx.com, localhost, localhost.localdomain, localhost
relayhost =
relay_domains = /var/lib/mailman3/data/postfix_domains
mynetworks = 127.0.0.0/8, [:: 1]/128, actual_server_ip
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

milter_default_action = accept
milter_protocol = 2
smtpd_milters = inet: localhost: 8891
non_smtpd_milters = inet: localhost: 8891

local_recipient_maps =
luser_relay = [email protected]

transport_maps = hash:/etc/postfix/transport
slow_destination_recipient_limit = 5
slow_destination_concurrency_limit = 2

现在我已经想不出如何让 mailman3 工作了。对我来说,保留 mailman2 并不重要,只要 mailman3 工作了,我就会准备摆脱它。

UPD:我开始接收邮件,但 mailman3 不会将它们发送到列表。出于某种原因,它会将其发送到特定邮箱。以下是 mail.log 的一部分,显示了如何处理发送到 mailman3 列表的消息。mail.err 和 mailman.log 中没有错误。

/var/log/mail.log
    postfix/smtpd[24824]: connect from xxxx.com
    postfix/smtpd[24824]: A30EB1171B: client=xxxxx.com
    postfix/cleanup[24827]: A30EB1171B: message-id=<[email protected]>
    opendkim[24800]: A30EB1171B: xxxxx.com  not internal
    opendkim[24800]: A30EB1171B: not authenticated
    opendkim[24800]: A30EB1171B: DKIM verification successful
    opendkim[24800]: A30EB1171B: s=20161025 d=xxxx.com SSL
    postfix/qmgr[20609]: A30EB1171B: from=<[email protected]>, size=12738, nrcpt=1 (queue active)
    postfix/cleanup[24827]: D91391179B: message-id=<[email protected]>
    postfix/local[24829]: A30EB1171B: to=<[email protected]>, relay=local, delay=0.23, delays=0.22/0/0/0.01, dsn=2.0.0, status=sent (forwarded as D91391179B)
    postfix/qmgr[20609]: D91391179B: from=<[email protected]>, size=13112, nrcpt=1 (queue active)
    postfix/qmgr[20609]: A30EB1171B: removed
    postfix/smtpd[24824]: disconnect from xxxxx.com ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7
    postfix/smtp[24771]: D91391179B: to=<[email protected]>, orig_to=<[email protected]>, relay=xxxxx.com []:25, delay=0.52, delays=0/0/0.05/0.46, dsn=2.0.0, status=sent (250 2.0.0 OK  1624661277 dz4si5042577qvb.36 - gsmtp)
    postfix/qmgr[20609]: D91391179B: removed

相关内容