Author Topic: (SOLVED) ERROR: HELO was not accepted (501)  (Read 11653 times)

Offline ginopilot

  • Newbie
  • *
  • Posts: 9
(SOLVED) ERROR: HELO was not accepted (501)
« on: October 31, 2016, 05:42:39 AM »
I have roundcube on a synology nas (Mail Station). I choose to use an external smtp server to send mail. I works on outlook and thunderbird, but not on roundcube. I got this errors:

[31-Oct-2016 09:30:18 +0100]: <ev3p4fit> Warning: Call to deprecated function get_table_name(); See bc.inc for replacement
[31-Oct-2016 09:30:18 Europe/Amsterdam] ERROR: Invalid response code received from server (501)
[31-Oct-2016 09:30:18 Europe/Amsterdam] ERROR: Invalid response code received from server (501)
[31-Oct-2016 09:30:18 Europe/Amsterdam] ERROR: HELO was not accepted (501)
[31-Oct-2016 09:30:18 +0100]: <ev3p4fit> SMTP Error: Connection failed: HELO was not accepted in /volume1/@appstore/MailStation/mail/program/lib/Roundcube/rcube.php on line 1595 (POST /mail/?_task=mail&_unlock=loading1477902618030&_lang=it&_framed=1&_action=send)

I configured roudcube in any way, I always got this error when I try to send email from within roundcube.

SMTP:smtp.tiscali.it
SMTP SSL port 465
SMTP account    userid@tiscali.it
Authentication needed

I put all that on roundcube in the smtp preferences, except the need for authentication, I can't find this option. I put and removed the mail domain value "tiscali.it" in the default smtp options, with no result.
Is there a way to use an external smtp on roundcube? How?
« Last Edit: October 31, 2016, 11:25:51 AM by ginopilot »

Offline ginopilot

  • Newbie
  • *
  • Posts: 9
Re: ERROR: HELO was not accepted (501)
« Reply #1 on: October 31, 2016, 06:26:08 AM »
Checked using a different SMTP server without authentication (port 25) and it works. So the problem is related to ssl or authentication.

Offline ginopilot

  • Newbie
  • *
  • Posts: 9
Re: ERROR: HELO was not accepted (501)
« Reply #2 on: October 31, 2016, 09:12:14 AM »
I tested smtp server:

ehlo prova
250-santino.mail.tiscali.it hello [80.181.100.183], pleased to meet you
250-AUTH LOGIN PLAIN CRAM-MD5 DIGEST-MD5
250-SIZE 34865152
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 OK

I seems right
Authenticating:

220 santino.mail.tiscali.it ESMTP service ready
auth login
334 VXNlcm5hbWU6
xxxxxxxxxxxx
334 UGFzc3dvcmQ6
xxxxxxxxxxxxx
235 2.7.0 LOGIN authentication successful

It works.

Does roundcube uses login or plain authentication?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Re: ERROR: HELO was not accepted (501)
« Reply #3 on: October 31, 2016, 10:15:05 AM »
You can set SMTP authentication in the in the config.inc.php with the following three options:
Code: [Select]
// SMTP username (if required) if you use %u as the username Roundcube
// will use the current username for login
$config['smtp_user'] = '';

// SMTP password (if required) if you use %p as the password Roundcube
// will use the current user's password for login
$config['smtp_pass'] = '';

// SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
// best server supported one)
$config['smtp_auth_type'] = '';

Offline ginopilot

  • Newbie
  • *
  • Posts: 9
Re: ERROR: HELO was not accepted (501)
« Reply #4 on: October 31, 2016, 10:41:46 AM »
thanks, I enabled the debugging instead. I find that:

[31-Oct-2016 15:39:03 +0100]: <rllnndni> Recv: 220 michael.mail.tiscali.it  ESMTP service ready
[31-Oct-2016 15:39:03 +0100]: <rllnndni> Send: EHLO _
[31-Oct-2016 15:39:03 +0100]: <rllnndni> Recv: 501 EHLO requires valid address
[31-Oct-2016 15:39:03 +0100]: <rllnndni> Send: HELO _
[31-Oct-2016 15:39:03 +0100]: <rllnndni> Recv: 501 HELO requires valid address

So roundcube send '_' as argument of helo and ehlo. That's the problem!

Offline ginopilot

  • Newbie
  • *
  • Posts: 9
Re: ERROR: HELO was not accepted (501)
« Reply #5 on: October 31, 2016, 11:10:43 AM »
Modified in 'prova' now i get:

[31-Oct-2016 16:04:46 +0100]: <rllnndni> Recv: 220 michael.mail.tiscali.it  ESMTP service ready
[31-Oct-2016 16:04:46 +0100]: <rllnndni> Send: EHLO prova
[31-Oct-2016 16:04:46 +0100]: <rllnndni> Recv: 250-michael.mail.tiscali.it hello [80.181.100.183], pleased to meet you
[31-Oct-2016 16:04:46 +0100]: <rllnndni> Recv: 250-AUTH LOGIN PLAIN CRAM-MD5 DIGEST-MD5
[31-Oct-2016 16:04:46 +0100]: <rllnndni> Recv: 250-SIZE 34865152
[31-Oct-2016 16:04:46 +0100]: <rllnndni> Recv: 250-ENHANCEDSTATUSCODES
[31-Oct-2016 16:04:46 +0100]: <rllnndni> Recv: 250-8BITMIME
[31-Oct-2016 16:04:46 +0100]: <rllnndni> Recv: 250 OK
[31-Oct-2016 16:04:46 +0100]: <rllnndni> Send: AUTH DIGEST-MD5
[31-Oct-2016 16:04:46 +0100]: <rllnndni> Recv: 334 cmVhbG09Im1pY2hhZWwubWFpbC50aXNjYWxpLml0Iixub25jZT0iNTdmY2E3MmUwMGQyZjQ3ZWJkZTcxNzNhOGVhZDgwNGQiLHFvcD0iYXV0aCIsY2hhcnNldD0idXRmLTgiLGFsZ29yaXRobT0ibWQ1LXNlc3Mi
[31-Oct-2016 16:04:46 +0100]: <rllnndni> Send: ****** [364]
[31-Oct-2016 16:04:46 +0100]: <rllnndni> Recv: 535 5.7.8 Authentication credentials invalid
[31-Oct-2016 16:04:46 +0100]: <rllnndni> Send: RSET
[31-Oct-2016 16:04:46 +0100]: <rllnndni> Recv: 250 2.0.0 OK
[31-Oct-2016 16:04:46 +0100]: <rllnndni> Send: QUIT
[31-Oct-2016 16:04:46 +0100]: <rllnndni> Recv: 221 2.0.0 michael.mail.tiscali.it  closing connection

Modified auth type in 'LOGIN' and bum! it now works!  ;D