Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate smtp_helo_host before use #6408

Closed
dsaard opened this issue Aug 23, 2018 · 4 comments
Closed

Validate smtp_helo_host before use #6408

dsaard opened this issue Aug 23, 2018 · 4 comments

Comments

@dsaard
Copy link

dsaard commented Aug 23, 2018

Upgraded from 1.1.5 to 1.3.7 with installto.sh

With 1.1.5 my exim setup works well

with 1.3.7 not if

$config['smtp_helo_host'] = '';

set in config.inc.php or missing complete
exim rejected the ehlo command

rejected EHLO from fe-srv [172.16.1.81]: syntactically invalid argument(s): _

if set smtp_helo_host to something my setup works well again

Cheers

@alecpl
Copy link
Member

alecpl commented Aug 23, 2018

If the option is empty, Roundcube will use $_SERVER['SERVER_NAME'] and if that var is also empty will fallback to 'localhost'. So, I guess there might be a misconfiguration of the http server/php on your side. Could you enable smtp_debug an try again? We'd see in the log what's really sent to the smtp server.

@dsaard
Copy link
Author

dsaard commented Aug 23, 2018

thx for the hint!!!

found the reason why SEVER_NAME is filled with an underline

i have nginx with php-fpm running and nginx is configured with an catch all server_name _ cause this one serves only this app and the balancer is configured to filter before :-)

equals

[23-Aug-2018 20:03:48 +0200]: <j2slr4va> Recv: 220 smtp.exsample.com ESMTP Exim ?.?? Thu, 23 Aug 2018 20:03:48 +0200
[23-Aug-2018 20:03:48 +0200]: <j2slr4va> Send: EHLO _
[23-Aug-2018 20:03:48 +0200]: <j2slr4va> Recv: 501 Syntactically invalid EHLO argument(s)
[23-Aug-2018 20:03:48 +0200]: <j2slr4va> Send: HELO _
[23-Aug-2018 20:03:48 +0200]: <j2slr4va> Recv: 501 Syntactically invalid HELO argument(s)

should be a configuration hint ...

Cheers

@alecpl
Copy link
Member

alecpl commented Aug 24, 2018

Right, I guess we should validate the configured value and fallback to localhost when invalid. https://tools.ietf.org/html/rfc5321#section-4.1.1.1

@alecpl alecpl added this to the 1.4-rc milestone Aug 24, 2018
@alecpl alecpl changed the title config smtp_helo_host not set by upgrade Validate smtp_helo_host before use Aug 24, 2018
@alecpl
Copy link
Member

alecpl commented Sep 5, 2018

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants