使用 postfix 或 mailman 重写或更改 MAIL FROM:

使用 postfix 或 mailman 重写或更改 MAIL FROM:

我遇到了 laposte.net 免费法国电子邮件提供商的问题:几个星期以来,他们的 smtp 服务器不再接受空邮件MAIL FROM。以下是示例 telnet 会话:

$ telnet smtpz4.laposte.net 25
Trying 194.117.213.1...
Connected to smtpz4.laposte.net.
Escape character is '^]'.
220 lpn-prd-vrin016 ESMTP Postfix (Ubuntu)
HELO XX.XXXXX.XXX
250 lpn-prd-vrin016
MAIL FROM:<>
501 5.0.1 Emetteur invalide. Invalid Sender. LPN007_403
421 4.7.0 lpn-prd-vrin016 Error: too many errors
Connection closed by foreign host.

我知道必须接受这些电子邮件,而且我已联系他们几次,但没有任何进展。

对我来说,问题在于邮递员邮件列表:由于邮件以空的形式发送MAIL FROM,因此所有地址均被拒绝laposte.net(其他域名工作正常)。

您是否知道一种解决方法,可以作为 Mailman 配置选项,或者使用 Postfix 特定的重写规则,将MAIL FROM发送到该域的邮件更改为空白?

编辑 :这里是 Mailman(我的系统上是 2.1.15 版本)发送的邮件的完整标题:

From - Wed Oct 15 17:08:30 2014
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
X-Mozilla-Keys: 
Return-Path: <MAILER-DAEMON>
Delivered-To: [email protected]
Received: from localhost (localhost.localdomain [127.0.0.1])
by ww.xxxxx.org (Postfix) with SMTP id 85104248A2
for <[email protected]>; Sun, 12 Oct 2014 12:02:34 +0200 (CEST)
Received: from ns279475.ip-91-121-90.eu (localhost.localdomain [127.0.0.1])
by ww.xxxxx.org (Postfix) with ESMTP id D5E342082D;
Sun, 12 Oct 2014 12:02:33 +0200 (CEST)
X-Original-To: [email protected]
Delivered-To: [email protected]
Received: from [IPv6:2a01:e34:ec12:8fe0:cd70:60bd:95b3:1f48] (unknown
[IPv6:2a01:e34:ec12:8fe0:cd70:60bd:95b3:1f48])
(Authenticated sender: xxxxxx)
by ww.xxxxx.org (Postfix) with ESMTPSA id 024CC2082D
for <[email protected]>; Sun, 12 Oct 2014 12:02:04 +0200 (CEST)
Message-ID: <[email protected]>
Date: Sun, 12 Oct 2014 12:02:03 +0200
From: =?UTF-8?B?V2VibWFzdGVyIMOJY29sZSBkZSBsYSBSaXpl?=
<[email protected]>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2
MIME-Version: 1.0
To: [email protected]
Content-Type: multipart/mixed; boundary="------------080100040705040508010509"
X-Mailman-Approved-At: Sun, 12 Oct 2014 12:02:32 +0200
Subject: [xxxx xxxxx] xxxxxxxxxxx
X-BeenThere: [email protected]
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <rize.infos.xxxxx.org>
List-Unsubscribe: <http://xxxxx.org/cgi-bin/mailman/options/rize.infos>;,
<mailto:[email protected]?subject=unsubscribe>
List-Post: <mailto:[email protected]>
List-Help: <mailto:[email protected]?subject=help>
List-Subscribe: <http://xxxxx.org/cgi-bin/mailman/listinfo/rize.infos>;,
<mailto:[email protected]?subject=subscribe>
Errors-To: [email protected]

答案1

看看Postfix 的 PCRE 映射。它允许您根据正则表达式定义来自地址重写的邮件。

相关内容