Roundcube SMTP error: Failed to set sender

173 Views Asked by At

I've installed Postfix, dovecot, and Roundcube on Centos, I'm receiving emails but cannot send an email.

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

this is 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

this is roundcube configuration:

$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',
  ],
];
1

There are 1 best solutions below

1
On

In your settings file set $config['smtp_user'] = '%u'; and $config['smtp_pass'] = '$p'; and you should be ok.