Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: boxyball on February 15, 2017, 05:31:59 PM

Title: domain appended to 553 errors
Post by: boxyball on February 15, 2017, 05:31:59 PM
When a user misspells an email address, it bounces back with the local domain appended to the email address.
It only does this from roundcube, not from a mail client like Thunderbird.
For example, if I send to [email protected] ... the 553 rejection comes back as [email protected]
How can I fix so that it only shows the original address without the append?

Thanks in advance.
Title: Re: domain appended to 553 errors
Post by: JohnDoh on February 16, 2017, 03:10:34 AM
i dont think thats normal. is your roundcube configured to send messages via smtp or php? also check the address set in your identity.
Title: Re: domain appended to 553 errors
Post by: boxyball on February 16, 2017, 06:06:07 PM
My identity is name <[email protected]>

Where would I check to see if I am using smtp or php to send?
Title: Re: domain appended to 553 errors
Post by: JohnDoh on February 17, 2017, 02:24:21 AM
that is defined in your roundcube config
Title: Re: domain appended to 553 errors
Post by: boxyball on February 17, 2017, 10:45:55 AM
I figured that.  It was the first place I looked but I could not find a setting that fits what you describe.
Would you happen to know the name of the setting?
Title: Re: domain appended to 553 errors
Post by: JohnDoh on February 17, 2017, 12:46:15 PM
the config option is smtp_server but I was just rereading your original post and I might have been pointing you in the wrong direction.

is it your address (as in the sender) that gets altered or the recipients address? if its the recipients address then I could be your smtp server that's changing it rather than roundcube.

if you are using an smtp server to send messages from roundcube, rather than php mail() then you can enable smtp_debug in your roundcube config and it will log the conversation between roundcube and your server when the message is sent. then you can check that log to see if the addresses are correct there. if they are, then you know its being changed later by the smtp server.
Title: Re: domain appended to 553 errors
Post by: boxyball on February 18, 2017, 01:08:48 AM
It is the recipient address that is being altered.
I am not using a separate smtp server to send.
My setting looks like this in defaults.inc.php:
$config['smtp_server'] = '';
Title: Re: domain appended to 553 errors
Post by: JohnDoh on February 18, 2017, 03:49:09 AM
and its not set in config.inc.php?

if smtp_server is left blank then PHP mail() is used. I suggest that you change your config to use an smtp server instead and see if the problem persists.

Also support for PHP mail() is being dropped in Roundcube 1.3.
Title: Re: domain appended to 553 errors
Post by: boxyball on February 18, 2017, 09:35:27 PM
roundcube is running on the mail server, so which do you recommend?
$config['smtp_server'] = 'localhost';
or
$config['smtp_server'] = 'smtp.domain.com';
Title: Re: domain appended to 553 errors
Post by: JohnDoh on February 19, 2017, 02:57:32 AM
personally i'd use localhost
Title: Re: domain appended to 553 errors
Post by: boxyball on February 20, 2017, 12:40:38 PM
I changed my config to ...
$config['smtp_server'] = 'localhost';
... and restarted apache and the problem remains.

I sent to [email protected] and got the following error:

Reporting-MTA: dns; mydomain.com
Received-From-MTA: DNS; localhost
Arrival-Date: Mon, 20 Feb 2017 11:38:14 -0600

Final-Recipient: RFC822; [email protected]
Action: failed
Status: 5.3.5
Diagnostic-Code: SMTP; 553 5.3.5 system config error
Last-Attempt-Date: Mon, 20 Feb 2017 11:38:15 -0600

This error does not occur if a bad email address is used in a client like Thunderbird ... it only happens with roundcube.
You can test by sending to an invalid domain.
Title: Re: domain appended to 553 errors
Post by: JohnDoh on February 20, 2017, 03:21:57 PM
it seems more like an smtp server issue to me than roundcube - unless you are running some roundcube plugin that's changing the recipient address.

like I suggested before if you enable smtp_debug in your roundcube config then a log of the conversation with the smtp server will be written in the roundcube logs folder and there you will see for sure if it was roundcube sending getting it wrong and if its not then it must be the smtp server.

you I understand that the same thing does not happen from thunderbird but I think that still does not rule the smtp server completely as it might handle messages that are sent locally and remotely differently.
Title: Re: domain appended to 553 errors
Post by: boxyball on February 20, 2017, 05:38:06 PM
I turned on logging.
Below are the contents.
Everything looks pretty normal.

[20-Feb-2017 16:34:38 -0600]: <viu6c26n> Recv: 220 mydomain.com ESMTP Sendmail 8.15.2/8.15.2; Mon, 20 Feb 2017 16:34:38 -0600
[20-Feb-2017 16:34:38 -0600]: <viu6c26n> Send: EHLO mydomain.com
[20-Feb-2017 16:34:38 -0600]: <viu6c26n> Recv: 250-mydomain.com Hello localhost [127.0.0.1], pleased to meet you
[20-Feb-2017 16:34:38 -0600]: <viu6c26n> Recv: 250-ENHANCEDSTATUSCODES
[20-Feb-2017 16:34:38 -0600]: <viu6c26n> Recv: 250-PIPELINING
[20-Feb-2017 16:34:38 -0600]: <viu6c26n> Recv: 250-8BITMIME
[20-Feb-2017 16:34:38 -0600]: <viu6c26n> Recv: 250-SIZE
[20-Feb-2017 16:34:38 -0600]: <viu6c26n> Recv: 250-AUTH GSSAPI
[20-Feb-2017 16:34:38 -0600]: <viu6c26n> Recv: 250-STARTTLS
[20-Feb-2017 16:34:38 -0600]: <viu6c26n> Recv: 250-DELIVERBY
[20-Feb-2017 16:34:38 -0600]: <viu6c26n> Recv: 250 HELP
[20-Feb-2017 16:34:38 -0600]: <viu6c26n> Send: MAIL FROM:<[email protected]>
[20-Feb-2017 16:34:38 -0600]: <viu6c26n> Recv: 250 2.1.0 <[email protected]>... Sender ok
[20-Feb-2017 16:34:38 -0600]: <viu6c26n> Send: RCPT TO:<[email protected]>
[20-Feb-2017 16:34:38 -0600]: <viu6c26n> Recv: 250 2.1.5 <[email protected]>... Recipient ok
[20-Feb-2017 16:34:38 -0600]: <viu6c26n> Send: DATA
[20-Feb-2017 16:34:38 -0600]: <viu6c26n> Recv: 354 Enter mail, end with "." on a line by itself
[20-Feb-2017 16:34:38 -0600]: <viu6c26n> Send: MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
format=flowed
Content-Transfer-Encoding: 7bit
Date: Mon, 20 Feb 2017 16:34:38 -0600
From: myaddress <[email protected]>
To: Blah <[email protected]>
Subject: test
Message-ID: <[email protected]>
X-Sender: [email protected]
User-Agent: Roundcube Webmail/1.1.4

test

[20-Feb-2017 16:34:38 -0600]: <viu6c26n> Send: .
[20-Feb-2017 16:34:38 -0600]: <viu6c26n> Recv: 250 2.0.0 v1KMYcT2000981 Message accepted for delivery
[20-Feb-2017 16:34:39 -0600]: <viu6c26n> Send: QUIT
[20-Feb-2017 16:34:39 -0600]: <viu6c26n> Recv: 221 2.0.0 mydomain.com closing connection
Title: Re: domain appended to 553 errors
Post by: JohnDoh on February 21, 2017, 03:05:09 AM
seems like the same issue as here http://unix.stackexchange.com/questions/63552/why-is-sendmail-appending-my-hostname-to-unknown-destination-domain
Title: Re: domain appended to 553 errors
Post by: boxyball on February 21, 2017, 11:01:35 AM
That solved the problem!  Thanks!

I removed the wildcard from my DNS record and that solved the problem.

Sorry to bother you about this one.  Since the problem only affected roundcube and not clients, I thought it was a roundcube configuration issue.