发送电子邮件时出错(从 [email protected] 到 [email protected],回复(回复标题)未定义)

发送电子邮件时出错(从 [email protected] 到 [email protected],回复(回复标题)未定义)

我在带有 PostFix 的 Ubuntu 18.04 服务器上安装了 Drupal 8 网站。

我可以发送和接收电子邮件,但服务器无法向自身发送通知。

电子邮件服务器地址是[电子邮件保护]

如果用户使用我的网站上的联系表单,我会收到此错误:

发送电子邮件时出错(来自[电子邮件保护][电子邮件保护] 对(回复标题)的回应未定义)

我怎样才能解决这个问题 ?

以下是从[电子邮件保护][电子邮件保护]

他工作。

但是当 drupal 通知或用户使用联系表单时,网站会发送[电子邮件保护][电子邮件保护]这是行不通的。

Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from localhost (HELO queue) (127.0.0.1)
    by localhost with SMTP; 15 Mar 2020 19:43:40 +0200
Received: from unknown (HELO output27.mail.ovh.net) (10.110.115.126)
  by mail261.mgra1.mail.ovh.net with AES256-GCM-SHA384 encrypted SMTP; 15 Mar 2020 19:43:40 +0200
Received: from vr20.mail.ovh.net (unknown [10.101.8.20])
    by out27.mail.ovh.net (Postfix) with ESMTP id 48gRcX5GTVz7s9BnY
    for <[email protected]>; Sun, 15 Mar 2020 17:43:40 +0000 (UTC)
Received: from in31.mail.ovh.net (unknown [10.101.4.31])
    by vr20.mail.ovh.net (Postfix) with ESMTP id 48gRcX3QFqzvvn3W
    for <[email protected]>; Sun, 15 Mar 2020 17:43:40 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=51.178.63.62; helo=benefitime.com; [email protected]; [email protected] 
Authentication-Results: in31.mail.ovh.net;
    dkim=pass (2048-bit key; unprotected) header.d=benefitime.com [email protected] header.b="B7WUCtqE";
    dkim-atps=neutral
Received: from benefitime.com (benefitime.com [51.178.63.62])
    by in31.mail.ovh.net (Postfix) with ESMTPS id 48gRcX39t7zbyMDr
    for <[email protected]>; Sun, 15 Mar 2020 17:43:40 +0000 (UTC)
Received: from [127.0.0.1] (localhost [127.0.0.1])
    by benefitime.com (Postfix) with ESMTP id 01FFD450F5
    for <[email protected]>; Sun, 15 Mar 2020 18:43:33 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=benefitime.com;
    s=smtp; t=1584294214;
    bh=jBaVruxH1CZZTsdxWSA6NPgxknU4XKU2xa+4nwQPye4=;
    h=Date:Subject:From:Reply-To:To:From;
    b=B7WUCtqEsNIdY381S895vJVYr95BI2TFOSMalFjothHA7iz6+f/TTmTaIKHfmPaVP
     TMt9FyhGghE4AYGNW1Siop8ptthH+2bUiw82vZoyk8JSFyGMmhY61u3kBYX8MFO+aG
     SyhO8cgdRsEcKkC1qi/vNKcqrh/EvnlXc4HCE7hBfGA25YwLa4zEie+sXyw78QGlXi
     xfnhTvn7tECverT55dnBGApnqRQEJ/cwDcrdU1KaUfP6Xz8fZBVNehwRC5rs1/Xvqe
     r/3FpfSWQv2YROpjr5wz+3SdHGjXPSYT2BIwxPaH4UKb0xZgXoO0DzfS3/ss3w8/8O
     inAIpATCj+Q0A==
Sender: [email protected]
Message-ID: <[email protected]>
Date: Sun, 15 Mar 2020 18:43:33 +0100
Subject: Swift Mailer has been successfully configured!
From: [email protected]
Reply-To: [email protected]
To: [email protected]
MIME-Version: 1.0
Content-Type: multipart/alternative;
 boundary="_=_swift_v4_1584294213_a5b48ab827ac3ceb2beded1da2283938_=_"
X-Mailer: Drupal
X-Ovh-Remote: 51.178.63.62 (benefitime.com)
X-Ovh-Tracer-Id: 7587439473018712399
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrudefuddgtdelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpehskfffuffhrhfvgggtofesrgdtjhhtredtjeenucfhrhhomheptghonhhtrggtthessggvnhgvfhhithhimhgvrdgtohhmnecukfhppeehuddrudejkedrieefrdeivdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehinhefuddrmhgrihhlrdhovhhhrdhnvghtpdhinhgvthephedurddujeekrdeifedriedvpdhmrghilhhfrhhomheptghonhhtrggtthessggvnhgvfhhithhimhgvrdgtohhmpdhrtghpthhtoheptghonhhtrggtthesshdusghiohhsvgdrtghomh
X-Ovh-Spam-Status: OK
X-Ovh-Spam-Reason: vr: OK; dkim: disabled; spf: disabled
X-Ovh-Message-Type: OK


--_=_swift_v4_1584294213_a5b48ab827ac3ceb2beded1da2283938_=_
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

=20

DEAR ADMINISTRATEUR,

This e-mail has been sent from benefiTime by the Swift Mailer module.
The module has been successfully configured.
Kind regards

The Swift Mailer module

=20

--_=_swift_v4_1584294213_a5b48ab827ac3ceb2beded1da2283938_=_
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style type=3D"text/css">
table tr td {
  font-family: Arial;
  font-size: 12px;
}
</style>
</head>
<body>
<div>
  <table width=3D"800px" cellpadding=3D"0" cellspacing=3D"0">
    <tr>
      <td>
        <div style=3D"padding: 0px 0px 0px 0px;">
          <h3>Dear administrateur,</h3>
<p>This e-mail has been sent from benefiTime by the Swift Mailer module. T=
he module has been successfully configured.</p>
Kind regards<br /><br />
<p>The Swift Mailer module</p>

        </div>
      </td>
    </tr>
  </table>
</div>
</body>
</html>


--_=_swift_v4_1584294213_a5b48ab827ac3ceb2beded1da2283938_=_--

以下是 PostFix 日志(发送至[电子邮件保护]这是行不通的):

Mar 16 00:08:34 www-benefitime-com postfix/smtpd[31465]: warning: cannot get RSA certificate from file "/etc/mail/ssl/benefitime.com/benefitime.com.bundle.crt": disabling TLS support
Mar 16 00:08:34 www-benefitime-com postfix/smtpd[31465]: warning: TLS library problem: error:02001002:system library:fopen:No such file or directory:../crypto/bio/bss_file.c:288:fopen('/etc/mail/ssl/benefitime.com/benefitime.com.bundle.crt','r'):
Mar 16 00:08:34 www-benefitime-com postfix/smtpd[31465]: warning: TLS library problem: error:20074002:BIO routines:file_ctrl:system lib:../crypto/bio/bss_file.c:290:
Mar 16 00:08:34 www-benefitime-com postfix/smtpd[31465]: warning: TLS library problem: error:140DC002:SSL routines:use_certificate_chain_file:system lib:../ssl/ssl_rsa.c:615:
Mar 16 00:08:34 www-benefitime-com postfix/smtpd[31465]: connect from localhost[127.0.0.1]
Mar 16 00:08:34 www-benefitime-com postfix/smtpd[31465]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in local recipient table; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<[127.0.0.1]>
Mar 16 00:08:34 www-benefitime-com postfix/smtpd[31465]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=0/1 rset=1 quit=1 commands=4/5

以下是 PostFix 日志(发送至[电子邮件保护]有效):

Mar 16 00:11:13 www-benefitime-com postfix/smtpd[31568]: warning: cannot get RSA certificate from file "/etc/mail/ssl/benefitime.com/benefitime.com.bundle.crt": disabling TLS support
Mar 16 00:11:13 www-benefitime-com postfix/smtpd[31568]: warning: TLS library problem: error:02001002:system library:fopen:No such file or directory:../crypto/bio/bss_file.c:288:fopen('/etc/mail/ssl/benefitime.com/benefitime.com.bundle.crt','r'):
Mar 16 00:11:13 www-benefitime-com postfix/smtpd[31568]: warning: TLS library problem: error:20074002:BIO routines:file_ctrl:system lib:../crypto/bio/bss_file.c:290:
Mar 16 00:11:13 www-benefitime-com postfix/smtpd[31568]: warning: TLS library problem: error:140DC002:SSL routines:use_certificate_chain_file:system lib:../ssl/ssl_rsa.c:615:
Mar 16 00:11:13 www-benefitime-com postfix/smtpd[31568]: connect from localhost[127.0.0.1]
Mar 16 00:11:13 www-benefitime-com postfix/smtpd[31568]: 8A8A3450F5: client=localhost[127.0.0.1]
Mar 16 00:11:13 www-benefitime-com postfix/cleanup[31571]: 8A8A3450F5: message-id=<[email protected]>
Mar 16 00:11:13 www-benefitime-com postfix/qmgr[16755]: 8A8A3450F5: from=<[email protected]>, size=1789, nrcpt=1 (queue active)
Mar 16 00:11:13 www-benefitime-com postfix/smtpd[31568]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Mar 16 00:11:19 www-benefitime-com postfix/smtp[31572]: 8A8A3450F5: to=<[email protected]>, relay=mx1.mail.ovh.net[188.165.36.237]:25, delay=5.8, delays=0.12/0.03/5.4/0.18, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 48gZtb24zLzbqg8w)
Mar 16 00:11:19 www-benefitime-com postfix/qmgr[16755]: 8A8A3450F5: removed

答案1

Postfix 日志告诉您哪里出了问题:您想发送给 (本地) 用户contact。但是本地用户contact不存在。因此 Postfix 不接受该电子邮件。

您需要创建一个用户或者为已存在的用户contact创建一个别名电子邮件地址。contact

此外,您还应该修复 postfix 报告的 TLS 问题。

相关内容