Roundcube SMTP 错误:无法设置发件人

问题描述 投票:0回答:1

我在 Centos 上安装了 Postfix、dovecot 和 Roundcube,我可以接收电子邮件,但无法发送电子邮件。

Trying to send email... 
SMTP send:  NOT OK(Failed to set sender '[email protected]': (Code: -1))

这是 smtp.log

[21-Oct-2023 16:41:22 +0330]: <oefpt1vg> Connecting to tls://127.0.0.1:587...
[21-Oct-2023 16:42:08 +0330]: <oefpt1vg> Recv: 220 mail.rayancommerce.com ESMTP Postfix
[21-Oct-2023 16:42:08 +0330]: <oefpt1vg> Send: EHLO mail.rayancommerce.com
[21-Oct-2023 16:42:08 +0330]: <oefpt1vg> Recv: 250-mail.rayancommerce.com
[21-Oct-2023 16:42:08 +0330]: <oefpt1vg> Recv: 250-PIPELINING
[21-Oct-2023 16:42:08 +0330]: <oefpt1vg> Recv: 250-SIZE 10240000
[21-Oct-2023 16:42:08 +0330]: <oefpt1vg> Recv: 250-VRFY
[21-Oct-2023 16:42:08 +0330]: <oefpt1vg> Recv: 250-ETRN
[21-Oct-2023 16:42:08 +0330]: <oefpt1vg> Recv: 250-STARTTLS
[21-Oct-2023 16:42:08 +0330]: <oefpt1vg> Recv: 250-ENHANCEDSTATUSCODES
[21-Oct-2023 16:42:08 +0330]: <oefpt1vg> Recv: 250-8BITMIME
[21-Oct-2023 16:42:08 +0330]: <oefpt1vg> Recv: 250 DSN
[21-Oct-2023 16:42:08 +0330]: <oefpt1vg> Send: STARTTLS
[21-Oct-2023 16:42:08 +0330]: <oefpt1vg> Recv: 220 2.0.0 Ready to start TLS
[21-Oct-2023 16:42:08 +0330]: <oefpt1vg> Send: EHLO mail.rayancommerce.com
[21-Oct-2023 16:42:09 +0330]: <oefpt1vg> Send: HELO mail.rayancommerce.com
[21-Oct-2023 16:42:09 +0330]: <oefpt1vg> Send: MAIL FROM:<[email protected]>
[21-Oct-2023 16:42:09 +0330]: <oefpt1vg> Send: RSET

这是圆形立方体配置:

$config['smtp_host'] = 'tls://127.0.0.1:587';
$config['smtp_debug'] = true;
$config['smtp_log'] = true;
$config['smtp_user'] = '';
$config['smtp_pass'] = '';

 $config['smtp_conn_options'] = [
  'ssl' => [
    'verify_peer' => false,
    'verify_peer_name' => false,
    'allow_self_signed' => true,
    'verify_depth' => 3,
    'cafile' => '/etc/httpd/ssl/server.crt',
  ],
];
email centos smtp roundcube
1个回答
0
投票

在您的设置文件中设置

$config['smtp_user'] = '%u';
$config['smtp_pass'] = '$p';
就可以了。

© www.soinside.com 2019 - 2024. All rights reserved.