Koozali.org: home of the SME Server

550 relaying denied

Offline edb

  • *
  • 546
  • +0/-0
550 relaying denied
« on: May 13, 2017, 12:36:45 AM »
I'm having an interesting issue with receiving a particular email and it has a < character appended to the actual email address and I don't know why.
This is the error:
dispatching RCPT TO:<"<mydesk"@domain.com>
550 relaying denied <mydesk@domain.com
note the < and I don't know why the email address which is a local legit email has that character attached to it or where that comes from but as a result the email is denied when it should be delivered.

Any input appreciated.
Thanks

-edb
« Last Edit: May 13, 2017, 12:40:49 AM by edb »
......

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: 550 relaying denied
« Reply #1 on: May 13, 2017, 09:46:34 AM »
How is the e-mail generated?

Offline k_graham

  • ***
  • 146
  • +0/-0
Re: 550 relaying denied
« Reply #2 on: May 13, 2017, 05:07:02 PM »
I'm having an interesting issue with receiving a particular email and it has a < character appended to the actual email address and I don't know why.
This is the error:
dispatching RCPT TO:<"<mydesk"@domain.com>
550 relaying denied <mydesk@domain.com
note the < and I don't know why the email address which is a local legit email has that character attached to it or where that comes from but as a result the email is denied when it should be delivered.

Any input appreciated.
Thanks

-edb

ARe you able to log into server manager as admin from web browser?

If not , do so at the server itself and run a reconfigure and reboot. actually either way try a reconfigure and reboor and see if is still an issue.

Ken.

Offline Jean-Philippe Pialasse

  • *
  • 2,743
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: 550 relaying denied
« Reply #3 on: May 13, 2017, 05:47:49 PM »
I'm having an interesting issue with receiving a particular email and it has a < character appended to the actual email address and I don't know why.
This is the error:
dispatching RCPT TO:<"<mydesk"@domain.com>
550 relaying denied <mydesk@domain.com
note the < and I don't know why the email address which is a local legit email has that character attached to it or where that comes from but as a result the email is denied when it should be delivered.

Any input appreciated.
Thanks

-edb

This happens to me frequently with the autocomplet function of Thunderbird.

Offline edb

  • *
  • 546
  • +0/-0
Re: 550 relaying denied
« Reply #4 on: May 13, 2017, 07:48:43 PM »
It is really weird because our ecommerce site (which runs on the mail server in question) sends a message to the external end user with details of their order and a duplicate of that message is sent to an internal user such as mydesk@domain.com for example.
The external message goes through to its external destination recipient just fine and the RCPT TO: looks like this enduser@domain.com which is normal but the email that goes to the internal email recipient looks like this RCPT TO:<"<mydesk"@domain.com> and is therefore rejected as relaying.

I just don't know if it is the construction of the message by our ecommerce app or if it is a smeserver issue.
All other email function work without any issue at all it is just a problem with this one thing and I just don't understand why it puts that character in there which I interpret as the root of the problem. But maybe it has nothing to do with it don't know.

-edb
......

Offline brianr

  • *
  • 988
  • +2/-0
Re: 550 relaying denied
« Reply #5 on: May 13, 2017, 08:11:28 PM »
I just don't know if it is the construction of the message by our ecommerce app or if it is a smeserver issue.
All other email function work without any issue at all it is just a problem with this one thing and I just don't understand why it puts that character in there which I interpret as the root of the problem. But maybe it has nothing to do with it don't know.

My guess is the E-commerce system - perhaps just a parameter badly typed somewhere.
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline edb

  • *
  • 546
  • +0/-0
Re: 550 relaying denied
« Reply #6 on: May 13, 2017, 08:50:50 PM »
That's what I am beginning to think as well. I will have to look into that end of it I guess as it must be getting that < character from somewhere when it creates the copy of the message. Thanks for all input.

-edb
......

Offline edb

  • *
  • 546
  • +0/-0
Re: 550 relaying denied
« Reply #7 on: May 14, 2017, 09:36:19 PM »
Spoke indepth with the developers of our ecommerce app and they say it is a qmail issue.
It appears that the smeserver sends the message out and when it is received by our Barracuda spam filter which handles all incoming mail it tries to deliver to the smeserver but the smeserver denies the message due to RCPT TO:<"<mydesk"@domain.com>
It is a weird issue because all other email function to internal or external mail recipients works fine except for this issue.

The ecommerce app running on smeserver simply takes the email address that is setup in the system where these emails are to be directed to and that email is supposed to receive the message as an admin function of the app.
The user that the email is supposed to go to is a local email user on the system mydesk@domain.com so I don't know why it is being denied as relaying.
......

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: 550 relaying denied
« Reply #8 on: May 14, 2017, 10:03:57 PM »
First of all, no developer will admit his fault, never ;-)
If every other email is working fine, your problem could be:
- the recipient e-mail address is wrong somewhere
- your webapp has a bug

Ask the developer:
How and from where the recipient address is taken
How the webapp creates the email

Offline edb

  • *
  • 546
  • +0/-0
Re: 550 relaying denied
« Reply #9 on: May 14, 2017, 10:16:51 PM »
I also just noticed that all users are now getting messages that should only be for the admin.
Such as failure notices. Why would that be happening?
......

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: 550 relaying denied
« Reply #10 on: May 14, 2017, 10:18:45 PM »
OK, time to open a bug
Please, do so and give all the info you can (the more, the better)

Offline edb

  • *
  • 546
  • +0/-0
Re: 550 relaying denied
« Reply #11 on: May 15, 2017, 07:30:25 AM »
No, I discovered the reason why it was sending to everyone on the system and it appears the error is produced when the mail layer is sending a wrong formed RCPT TO: command in the SMTP transaction. In this case the name was Businessname and the email was mydesk@domain.com so when sending PHP passes it off to the mail layer as businessname and I just happen to have a group account setup with that same name that included all users. I changed that name and the emails to all users stopped.
I believe it is an issue with PHP based on this link https://bugs.php.net/bug.php?id=28038
Down toward the bottom of the link it states this:
Quote
[2009-08-18 18:50 UTC] garretts@php.net
I've fixed this in PHP-5.3.1-dev.

I added in code to use the contents between angle brackets < > if there is a pair of angle brackets passed in.

If the angle brackets are not passed in as a pair, this patch doesn't alter the contents (missing one angle bracket is clearly invalid), and should likely be rejected by the SMTP server.

And, for the record SMTP (RFC 2821) doesn't have its addresses defined by RFC 2822 for "MAIL FROM:" and "RCPT TO:" -- they should be just the undecorated mailbox address. (see RFC 2821- 4.1.2 Command Argument Syntax)

This clearly describes the issue I am having but I just don't know how to fix it yet to tell PHP not to use <>

-edb
......

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: 550 relaying denied
« Reply #12 on: May 15, 2017, 09:10:35 AM »
So, nothing related to qmail..
It's up to your webapp devs to solve the issue

Offline edb

  • *
  • 546
  • +0/-0
Re: 550 relaying denied
« Reply #13 on: May 15, 2017, 03:25:25 PM »
Could it be that I have magic_quotes_gpc = off when maybe it should be set to on in PHP?

Update - well enabling that just disabled the site so that wasn't the problem unless I used the wrong magic quotes comment.

I don't think it is not an SME issue just an issue with how PHP seems to handle the name<emailaddress> portion of a form.
« Last Edit: May 15, 2017, 05:06:06 PM by edb »
......

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: 550 relaying denied
« Reply #14 on: May 15, 2017, 05:02:26 PM »
edb, my very very humble 2c: 99% the issue is in your webapp's code..

Quote
Ask the developer:
How and from where the recipient address is taken
How the webapp creates the email