Release Support > Release Discussion
SMTP Error (554): Sending to remote addresses (relaying) is not allowed.
mcnesium:
I am trying to run Roundcube Webmail 1.4.4 in a Docker environment (see here for Dockerfile etc.) with the identity-smtp plugin, which allows me to also send mail from multiple mail accounts (identities).
Problem: sending mails does only work for recipients whose domain name is also handled by the same SMTP-server that I am trying to send mail to. For any other recipient, the following error message appears:
> SMTP Error (554): Failed to add recipient "mail@recipient.tld" (Refused. Sending to remote addresses (relaying) is not allowed.)
I am not sure whether that is a configuration error or a bug within one of the components. For the plugin I already asked here, but no response there. In another non-dockerized setup and Roundcube Webmail 1.3.10 this plugin is included and works very well. So either this is an issue with v1.4.x or a configuration error.
How can I fix this? Any help?
JohnDoh:
Check the SMTP settings in your RC config, specifically smtp_user and smtp_pass. That error could me that you do not have SMTP auth enabled and you need it to send external mail.
mcnesium:
Thank you for your reply. What exactly do you mean by "Check the SMTP settings"? Here is what they look like:
--- Code: ---$ docker-compose exec roundcube cat config/config.inc.php
<?php
$config['db_dsnw'] = 'mysql://roundcube:xxxxxxxx@db:3306/roundcube';
$config['db_dsnr'] = '';
$config['default_host'] = 'ssl://imap.example.org';
$config['default_port'] = '993';
$config['des_key'] = 'xxxxxxxxxxxx';
$config['temp_dir'] = '/tmp/roundcube-temp';
$config['plugins'] = ['archive', 'zipdownload', 'enigma', 'jqueryui', 'managesieve', 'markasjunk', 'identity_smtp', 'carddav', 'contextmenu'];
$config['zipdownload_selection'] = true;
$config['log_driver'] = 'stdout';
$config['skin'] = 'elastic';
$config['smtp_server'] = 'xyz.uberspace.de';
$config['smtp_port'] = '587';
$config['smtp_user'] = 'abc@xyz.uberspace.de';
$config['smtp_pass'] = 'xxxxxxxx';
--- End code ---
I added smtp_user and smtp_pass settings manually to the config file in the container, because they are not being added here (I might send a PR on that later) – then logged out and back in, all that.
But what is the matter with default SMTP settings anyway? Individual SMTP settings for each identity is exactly what the identity_smtp plugin is for, so the default SMTP settings of my RC should not matter at all, or is that a wrong assumption?
mcnesium:
I added $config['smtp_debug'] = true; to the config. The output doesn't seem to include much better information about what is wrong:
Here is the output for sending a mail to an account that uses the same SMTP:
--- Quote --- smtp: <7cc5f104> Connecting to tls://schedar.uberspace.de:587...
smtp: <7cc5f104> Recv: 220 schedar.uberspace.de ESMTP
smtp: <7cc5f104> Send: EHLO webmail.mydomain.de
smtp: <7cc5f104> Recv: 250-schedar.uberspace.de
smtp: <7cc5f104> Recv: 250-STARTTLS
smtp: <7cc5f104> Recv: 250-PIPELINING
smtp: <7cc5f104> Recv: 250-8BITMIME
smtp: <7cc5f104> Recv: 250 AUTH LOGIN PLAIN
smtp: <7cc5f104> Send: MAIL FROM:<mail@mydomain.de>
smtp: <7cc5f104> Recv: 250 ok
smtp: <7cc5f104> Send: RCPT TO:<qwer@mydomain.de>
smtp: <7cc5f104> Recv: 250 ok
smtp: <7cc5f104> Send: DATA
smtp: <7cc5f104> Recv: 354 Proceed.
…
--- End quote ---
And here is the output when sending to some other receipient on a different mail server:
--- Quote --- smtp: <7cc5f104> Connecting to tls://schedar.uberspace.de:587...
smtp: <7cc5f104> Recv: 220 schedar.uberspace.de ESMTP
smtp: <7cc5f104> Send: EHLO webmail.mydomain.de
smtp: <7cc5f104> Recv: 250-schedar.uberspace.de
smtp: <7cc5f104> Recv: 250-STARTTLS
smtp: <7cc5f104> Recv: 250-PIPELINING
smtp: <7cc5f104> Recv: 250-8BITMIME
smtp: <7cc5f104> Recv: 250 AUTH LOGIN PLAIN
smtp: <7cc5f104> Send: MAIL FROM:<mail@mydomain.de>
smtp: <7cc5f104> Recv: 250 ok
smtp: <7cc5f104> Send: RCPT TO:<mail@otherdomain.com>
smtp: <7cc5f104> Recv: 554 Refused. Sending to remote addresses (relaying) is not allowed.
errors: <7cc5f104> PHP Error: Invalid response code received from server (POST /?_task=mail&_unlock=loading1589809230866&_framed=1&_lang=en_US&_action=send)
smtp: <7cc5f104> Send: RSET
smtp: <7cc5f104> Recv: 250 flushed
errors: <7cc5f104> SMTP Error: Failed to add recipient 'mail@otherdomain.com'. Refused. Sending to remote addresses (relaying) is not allowed. (Code: 554) in /var/www/html/program/lib/Roundcube/rcube.php on line 1702 (POST /?_task=mail&_unlock=loading1589809230866&_framed=1&_lang=en_US&_action=send)
smtp: <7cc5f104> Send: QUIT
smtp: <7cc5f104> Recv: 221 schedar.uberspace.de172.21.0.1 - - [18/May/2020:13:40:31 +0000] "POST /?_task=mail&_unlock=loading1589809230866&_framed=1&_lang=en_US HTTP/1.1" 200 956 "https://webmail.mydomain.de/?_task=mail&_action=compose&_id=15772262815ec29043a5049" "Mozilla/5.0 (X11; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0"
--- End quote ---
Is that output more helpful?
JohnDoh:
--- Quote ---I added smtp_user and smtp_pass settings manually to the config file in the container, because they are not being added here (I might send a PR on that later) – then logged out and back in, all that.
--- End quote ---
If you have a installation and you are using 1.4 then smtp auth is enabled by default so that is probably why they are not included in the config file.
--- Quote ---But what is the matter with default SMTP settings anyway?
--- End quote ---
That is what we are trying to figure out isn't it? You said it works fine with other clients right?
--- Quote ---Individual SMTP settings for each identity is exactly what the identity_smtp plugin is for, so the default SMTP settings of my RC should not matter at all, or is that a wrong assumption?
--- End quote ---
I dont know anything about that plugin. If I were you I'd disable all plugins while trying to solve the issue in case it is being caused by one of them.
Navigation
[0] Message Index
[#] Next page
Go to full version