1 (edited by daniel 2017-09-12 04:35:27)

Topic: Cannot connect to SMTP Server

======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.7 MYSQL edition.
- Linux/BSD distribution name and version: Ubuntu 16.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi,
I installed iRedMail yesterday and for now everything was very smooth - except that I cannot send email with smtp. Although I can send mail with roundcube, so I guess it must be a connection issue.

With Thunderbird/Evolution I get the following error messages:

5.7.1 Service unavailable; client [MY IP] blocked using zen.spamhouse.org.
Please check the email address of recipient "receiver@gmail.com".

When I am not getting this error I'm getting a timeout error.

I've searched the web and it seems to be ok that my dynamic home IP is on the zen.spamhouse.org list.

This error in  /var/log/maillog:

Sep 11 15:33:23 email postfix/postscreen[20036]: CONNECT from [85.23X.XX.XX]:47586 to [172.31.22.246]:25
Sep 11 15:33:23 email postfix/postscreen[20036]: CONNECT from [85.23X.XX.XX]:47590 to [172.31.22.246]:25
Sep 11 15:33:23 email postfix/postscreen[20036]: PREGREET 33 after 0.02 from [85.23X.XX.XX]:47586: EHLO we-guess.mozilla.org\r\nQUIT\r\n
Sep 11 15:33:23 email postfix/postscreen[20036]: PREGREET 27 after 0.02 from [85.23X.XX.XX]:47590: EHLO we-guess.mozilla.org\r\n
Sep 11 15:33:23 email postfix/dnsblog[20038]: addr 85.23X.XX.XX listed by domain zen.spamhaus.org as 127.0.0.11
Sep 11 15:33:23 email postfix/postscreen[20036]: DNSBL rank 3 for [85.23X.XX.XX]:47586
Sep 11 15:33:23 email postfix/postscreen[20036]: DNSBL rank 3 for [85.23X.XX.XX]:47590
Sep 11 15:33:23 email postfix/postscreen[20036]: COMMAND PIPELINING from [85.23X.XX.XX]:47586 after EHLO: QUIT\r\n
Sep 11 15:33:23 email postfix/postscreen[20036]: DISCONNECT [85.23X.XX.XX]:47586
Sep 11 15:33:23 email postfix/postscreen[20036]: COMMAND PIPELINING from [85.23X.XX.XX]:47590 after EHLO: QUIT\r\n
Sep 11 15:33:23 email postfix/postscreen[20036]: DISCONNECT [85.23X.XX.XX]:47590

As I tried to fix this issue I commented out everything under postscreen in /etc/postfix/main.cf

#
# Postscreen
#
#postscreen_greet_action = enforce
#postscreen_blacklist_action = enforce
#postscreen_dnsbl_action = enforce
#postscreen_dnsbl_threshold = 2
#postscreen_dnsbl_sites =
#    zen.spamhaus.org=127.0.0.[2..11]*3
#    b.barracudacentral.org=127.0.0.[2..11]*2

#postscreen_dnsbl_reply_map = texthash:/etc/postfix/postscreen_dnsbl_reply
#postscreen_access_list = permit_mynetworks cidr:/etc/postfix/postscreen_access.cidr

# Require Postfix-2.11+
#postscreen_dnsbl_whitelist_threshold = -2

In Evolution I'm now getting this error:

The error message was »RCPT TO <myRecipient@gmail.com> failed: <localHostname>: Helo command rejected: need fully-qualified hostname«.

Then there is my localHostname, which is not a fully qualified hostname. But I cannot imaging why my computer on which Thunderbird is running needs a FQD for SMTP.

I hope you can help me out smile

Best regards,
Daniel

2

Re: Cannot connect to SMTP Server

Please do not modify any Postfix settings. You need to enable SMTP AUTH in your Thunderbird.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

3 (edited by evilstiefel 2017-09-12 18:39:22)

Re: Cannot connect to SMTP Server

To elaborate a bit more, make sure your SMTP-server settings are configured correctly like outlined in the documentation (Section "Quick MUA settings") in your e-mail client.

There is no need to "fix" anything with the configuration of postfix.

By default, iRedMail enables SMTP on Port 587 via TLS, NOT via port 25 (also sometimes known as the "submission" service).

4

Re: Cannot connect to SMTP Server

I've reverted my changes to the Postfix settings and restarted Postfix.

I've been trying all combinations for the server settings but I can't get it to work.
SMTP AUTH should be enabled by default when I select "Password, normal" as the authentification method.

The documentation says:
SMTP: Port 587, TLS, Password, normal

That's what I did. Also I tried:

https://image.ibb.co/mFqPGv/587_tls.png
https://image.ibb.co/cq1Wwv/587_starttls.png
https://image.ibb.co/jHn4Gv/25_starttls.png

None of the above work.

5

Re: Cannot connect to SMTP Server

The settings in second screenshot is correct: port 587, STARTTLS.
What's the error in Thunderbird with this setting? Also, any related error in Postfix log file on your server?

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

6

Re: Cannot connect to SMTP Server

Oh god - I feel so stupid right now.
Port 587 wasn't opened in the firewall of the server.

I'm hosting it on Amazon EC2 and when you select SMTP it only opens port 25/465.

Thanks for your help.

Best regards,
Daniel