Can't send email to internet

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
hungtq
New user
New user
Posts: 7
Joined: 2021-06-19 03:03

Can't send email to internet

Post by hungtq » 2021-06-19 03:35

Hi everybody

I can telnet to public 25 of smtp.gmail.com this means my port 25 is not blocked. but I can't send mail to the internet
Image

and here are the logs when i send mail to gmail
1.PNG
2.PNG
and here is Diagnostics


3.PNG
I tried but can't find the cause, please help me
P/s: I can't telnet to mail.hmailserver.com on the email server, but can on another computer in the local network.

ashtec014
Normal user
Normal user
Posts: 158
Joined: 2019-09-05 11:56

Re: Can't send email to internet

Post by ashtec014 » 2021-06-19 08:23

Run this and post the results: viewtopic.php?f=20&t=30914

hungtq
New user
New user
Posts: 7
Joined: 2021-06-19 03:03

Re: Can't send email to internet

Post by hungtq » 2021-06-19 08:51

Thanks for the reply, and here are the diagnostic results at my server

Code: Select all

2021-06-19   Hmailserver: 5.6.7-B2425

DOMAINS

   "Domain1.com" - baxxxxxxxxxxxx.vn              Enabled: True

SIGNATURE         LIMITS                       DKIM               ADVANCED
  Enabled: False   Max size:                0   Enabled: True      Catchall: postmaster@Domain1.com
                   Max message size:        0   Header:   Relaxed  Plus addressing: False
                   Max size of accounts:    0   Body:     Relaxed
                                                Algorithm: SHA256  Greylisting:     False
                                                Private key: c:\program files\openssl-win64\bin\rsa.private.Domain1.com
                                                Selector:    mydkim
-----------------------------------------------------------------------------------------------

IP RANGES

IP: 127.0.0.1 - 127.0.0.1     Priority: 15     Name: My computer

  Allow connections                         Other
     SMTP:   True                              Antispam :   True
     POP3:   True                              Antivirus:   True !! ANTIVIRUS NOT CONFIGURED !!
     IMAP:   True                              SSL/TLS:    False

  Allow Deliveries from                     Require Authentication from
     Local To Local       -  True              Local To Local       -  True
     Local To External    -  True              Local To External    -  True
     External To Local    - False    
     External To External - False           


IP: 0.0.0.0 - 255.255.255.255     Priority: 10     Name: Internet

  Allow connections                         Other
     SMTP:   True                              Antispam :   True
     POP3:   True                              Antivirus:   True !! ANTIVIRUS NOT CONFIGURED !!
     IMAP:   True                              SSL/TLS:    False

  Allow Deliveries from                     Require Authentication from
     Local To Local       -  True              Local To Local       -  True
     Local To External    -  True              Local To External    -  True
     External To Local    -  True              External To Local    - False
     External To External - False           


   !!  Warning:  DEFAULT DOMAIN is SET  !! - "Domain1.com"
------------------------------------------------------
AUTOBANNED Local Addresses:
    No entries

-----------------------------------------------------------------------------------------------

AUTOBAN
  Autoban Enabled: True       Max invalid logon attempts:      3
                              Minutes Before Reset:           30  (0.50 hours, 0.02 days)
                              Minutes to Autoban:             60  (1.00 hours, 0.04 days)

No problems were found in the IP range configuration.
-----------------------------------------------------------------------------------------------

INCOMING RELAYS
   No entries
-----------------------------------------------------------------------------------------------

MIRRORING         Disabled
-----------------------------------------------------------------------------------------------

PROTOCOLS

SMTP
GENERAL             DELIVERY                  RFC COMPLIANCE            ADVANCED
No. Connections:  0  No Retries:  4 Mins: 60   Plain Text:         True  Bind: 113.190.45.10
                     Host: EXTERNAL.TLD        Empty sender:       True  Batch recipients:   100
Max Msg Size:     0  Relay:-                   Incorrect endings:  True  Use STARTTLS:      True
                     (none entered)            Disc. on invalid:   True  Delivered-To hdr: False
                                               Max number commands: 100  Loop limit:           5
                                                                         Recipient hosts:     15
  Routes:
     No routes defined.

POP3
  No. Connections: 0

IMAP
 GENERAL                   PUBLIC FOLDERS                    ADVANCED
  No. Connections:   0      Public folder name: #Public       IMAP sort:  True
                                                              IMAP Quota: True
                                                              IMAP Idle:  True
                                                              IMAP ACL:   True
                                                              Delim: "."
-----------------------------------------------------------------------------------------------

ANTISPAM

GENERAL                              SPAM TESTS              Score   SPAMASSASSIN
  Spam Mark:                  5       Use SPF:            True - 3    Use Spamassassin:    True
  Add X-HmailServer-Spam:     True    Check HELO host:    True - 2    Hostname:       127.0.0.1
  Add X-HmailServer-Reason:   True    Check MX records:   True - 2    Port:                 783
  Add X-HmailServer-Subject: False    Verify DKIM:        True - 5    Use SA score:        True

  Spam delete threshold: 5         Maximum message size: 1024

DNSBL ENTRIES:
                  zen.spamhaus.org      Score: 2     Result: 127.0.0.2-8|127.0.0.10-11
                    bl.spamcop.net      Score: 2     Result: 127.0.0.2

SURBL ENTRIES:
                   multi.surbl.org      Score: 2

GREYLISTING:
  Greylisting:   True       Defer mins: 30       Days Unused: 1      Days Used: 36
                            Bypass SPF: True     Bypass A/MX: False

Greylist WHITELIST ENTRIES:
   No entries

Greylist DOMAINS enabled:
  !! No active domains enabled - GREYLISTING INEFFECTIVE !!

WHITELISTING
              113.190.45.10      to    255.255.255.245              
-----------------------------------------------------------------------------------------------

ANTIVIRUS:  No application configured.

  Block Attachments: True
               *.bat             Batch processing file
               *.cmd             Command file for Windows NT
               *.com             Command
               *.cpl             Windows Control Panel extension
               *.csh             CSH script
               *.exe             Executable file
               *.inf             Setup file
               *.lnk             Windows link file
               *.msi             Windows Installer file
               *.msp             Windows Installer patch
               *.pif             Program Information file
               *.reg             Registration key
               *.scf             Windows Explorer command
               *.scr             Windows Screen saver
-----------------------------------------------------------------------------------------------

SSL CERTIFICATES
   Domain1.com
       Certificate: C:\Program Files (x86)\hMailServer\Bin\SSL\Domain1.com.cert
       Private key: C:\Program Files (x86)\hMailServer\Bin\SSL\Domain1.com.key
-----------------------------------------------------------------------------------------------

SSL/TLS
             SSL 3.0 :  False
             TLS 1.0 :   True
             TLS 1.1 :   True
             TLS 1.2 :   True                Verify Remote SSL/TLS Certs:   True
SslCipherList  :

ECDHE-RSA-AES128-GCM-SHA256     - ECDHE-ECDSA-AES128-GCM-SHA256   - ECDHE-RSA-AES256-GCM-SHA384     
ECDHE-ECDSA-AES256-GCM-SHA384   - DHE-RSA-AES128-GCM-SHA256       - DHE-DSS-AES128-GCM-SHA256       
kEDH+AESGCM                     - ECDHE-RSA-AES128-SHA256         - ECDHE-ECDSA-AES128-SHA256       
ECDHE-RSA-AES128-SHA            - ECDHE-ECDSA-AES128-SHA          - ECDHE-RSA-AES256-SHA384         
ECDHE-ECDSA-AES256-SHA384       - ECDHE-RSA-AES256-SHA            - ECDHE-ECDSA-AES256-SHA          
DHE-RSA-AES128-SHA256           - DHE-RSA-AES128-SHA              - DHE-DSS-AES128-SHA256           
DHE-RSA-AES256-SHA256           - DHE-DSS-AES256-SHA              - DHE-RSA-AES256-SHA              
AES128-GCM-SHA256               - AES256-GCM-SHA384               - ECDHE-RSA-RC4-SHA               
ECDHE-ECDSA-RC4-SHA             - AES128                          - AES256                          
RC4-SHA                         - HIGH                            - !aNULL                          
!eNULL                          - !EXPORT                         - !DES                            
!3DES                           - !MD5                            - !PSK;                           
-----------------------------------------------------------------------------------------------

TCPIP PORTS                                         Connection Sec
               0.0.0.0         / 25    / SMTP   -   None                
               0.0.0.0         / 110   / POP3   -   None                
               0.0.0.0         / 143   / IMAP   -   None                
               0.0.0.0         / 465   / SMTP   -   SSL/TLS             Cert: Domain1.com
               0.0.0.0         / 587   / SMTP   -   None                
               0.0.0.0         / 995   / POP3   -   SSL/TLS             Cert: Domain1.com
-----------------------------------------------------------------------------------------------

LOGGING      Logging Enabled: True

  Paths:-
    Current:  C:\Program Files (x86)\hMailServer\Logs\hmailserver_2021-06-19.log
    Error:    C:\Program Files (x86)\hMailServer\Logs\ERROR_hmailserver_2021-06-19.log
    Event:    C:\Program Files (x86)\hMailServer\Logs\hmailserver_events.log - Not present
    Awstats:  C:\Program Files (x86)\hMailServer\Logs\hmailserver_awstats.log
                        APPLICATION -    True
                        SMTP        -    True
                        POP3        -    True
                        IMAP        -    True
                        TCPIP       -    True
                        DEBUG       -    True
                        AWSTATS     -    True
-----------------------------------------------------------------------------------------------

SYSTEM TESTS

Database type: MySQL

IPv6 support is available in operating system.

Backup directory C:\ is writable.

Relative message paths are stored in the database for all messages.

-----------------------------------------------------------------------------------------------

HMAILSERVER.INI

[Directories]
Program folder:  C:\Program Files (x86)\hMailServer\
Database folder: 
Data folder:     C:\Program Files (x86)\hMailServer\Data
Log folder:      C:\Program Files (x86)\hMailServer\Logs
Temp folder:     C:\Program Files (x86)\hMailServer\Temp
Event folder:    C:\Program Files (x86)\hMailServer\Events

[Database]
Type=              MYSQL
Username=          root
PasswordEncryption=1
Port=              3306
Server=            localhost
Internal=          0
-----------------------------------------------------------------------------------------------

Generated by HMSSettingsDiagnostics v2.01, Hmailserver Forum.

User avatar
jimimaseye
Moderator
Moderator
Posts: 9173
Joined: 2011-09-08 17:48

Re: Can't send email to internet

Post by jimimaseye » 2021-06-19 09:31

1,

Code: Select all

Bind: 113.190.45.10
Remove this (leave blank)


2,
Port 25 seems blocked.
https://www.hmailserver.com/documentati ... es_outside

[Entered by mobile. Excuse my spelling.]
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

hungtq
New user
New user
Posts: 7
Joined: 2021-06-19 03:03

Re: Can't send email to internet

Post by hungtq » 2021-06-19 10:32

Select Start->Run
Type telnet mail.hmailserver.com 25
Click OK to start the telnet session
Image

i can telnet to hmailserver

113.190.45.10 is my ip public server address, where Remove this?
Last edited by hungtq on 2021-06-19 10:36, edited 1 time in total.

Virinum
Normal user
Normal user
Posts: 163
Joined: 2018-11-23 14:42
Location: Germany

Re: Can't send email to internet

Post by Virinum » 2021-06-19 10:45

hungtq wrote:
2021-06-19 10:32
113.190.45.10 is my ip public server address, where Remove this?
Settings -> Protocols -> SMTP -> Advanced -> Bind to local IP address

User avatar
jimimaseye
Moderator
Moderator
Posts: 9173
Joined: 2011-09-08 17:48

Re: Can't send email to internet

Post by jimimaseye » 2021-06-19 10:55

hungtq wrote:
2021-06-19 10:32
i can telnet to hmailserver
Your diagnostic screenshot above says different.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

hungtq
New user
New user
Posts: 7
Joined: 2021-06-19 03:03

Re: Can't send email to internet

Post by hungtq » 2021-06-19 11:34

I'm sorry, I had telnet on my computer instead of the server

on server i can telnet to smtp.gmail.com or smtp.mail.yahoo.com but not telnet to mail.hmailserver.com
5.PNG
5.PNG (9.19 KiB) Viewed 873 times
6.PNG
6.PNG (4.18 KiB) Viewed 873 times
7.PNG
7.PNG (4.46 KiB) Viewed 873 times
I don't know why

Virinum
Normal user
Normal user
Posts: 163
Joined: 2018-11-23 14:42
Location: Germany

Re: Can't send email to internet

Post by Virinum » 2021-06-19 12:50

Can you ping mail.hmailserver.com?
What does "tracert mail.hmailserver.com" look like?

Have you removed the binding of the IP address in Settings -> Protocols -> SMTP -> Advanced -> Bind to local IP address?

Have you tried entering "smtp.gmail.com" in field "Outbound port 25 Test hostname" in diagnostics?

palinka
Senior user
Senior user
Posts: 2779
Joined: 2017-09-12 17:57

Re: Can't send email to internet

Post by palinka » 2021-06-19 12:52

Maybe a temporary network error?

I tried it myself and amazingly - got through. Looks like my ISP unblocked port 25. But I'm still on the PBL, so I can't "go native" with hmailserver. :( The marginal cost of business class IP is a LOT more than the $5/month I spend on my relayer service, not to mention I never have to deal with reputation.

hungtq
New user
New user
Posts: 7
Joined: 2021-06-19 03:03

Re: Can't send email to internet

Post by hungtq » 2021-06-19 15:25

Virinum wrote:
2021-06-19 12:50
Can you ping mail.hmailserver.com?
What does "tracert mail.hmailserver.com" look like?
I can ping mail.hmailserver.com and tracert normal
9.PNG
10.PNG
Virinum wrote:
2021-06-19 12:50
Have you removed the binding of the IP address in Settings -> Protocols -> SMTP -> Advanced -> Bind to local IP address?
I did removed the binding of the IP address
8.PNG
Virinum wrote:
2021-06-19 12:50
Have you tried entering "smtp.gmail.com" in field "Outbound port 25 Test hostname" in diagnostics?
I did tried entering "smtp.gmail.com" in field "Outbound port 25 Test hostname" in diagnostic
and same result as for mail.hmailserver.com


i have turned off windows firewall, and on another computer on the same network can telnet to mail.hmailserver.com

Virinum
Normal user
Normal user
Posts: 163
Joined: 2018-11-23 14:42
Location: Germany

Re: Can't send email to internet

Post by Virinum » 2021-06-19 15:55

Yes, you’re right. That’s a very strange behavior.

Is there a anti-virus program running which may is blocking hmailserver creating an outbound connection?

hungtq
New user
New user
Posts: 7
Joined: 2021-06-19 03:03

Re: Can't send email to internet

Post by hungtq » 2021-06-19 16:02

i only use windows defender. and tried turning it off

ignore mail.hmailserver.com. but smtp.gmail.com can telnet on port 25 but diagnostic still faill
11.PNG

palinka
Senior user
Senior user
Posts: 2779
Joined: 2017-09-12 17:57

Re: Can't send email to internet

Post by palinka » 2021-06-19 18:25

I think telnet is routing outbound traffic through any available port and since port 25 on these other servers is open, they respond. They respond by telnet to me as well. However, hmailserver connects via outbound port 25, so if that's blocked, then its blocked. I am no network engineer by a long shot. I could be completely wrong about all this, but I do know that some apps use random outgoing ports even though they're connecting to specific remote ports.

I just found this interesting outgoing port tester: http://52.47.209.216

It listens on all ports. If you have an outgoing port blocked, it will timeout. I tried it with http://52.47.209.216:25 and it timed out - and remember, telnet worked on port 25 at mail.hmailserver.com. However, trying http://52.47.209.216:26 or any other port works fine. Give it a try.

Edit -
Please also note that this server uses some port for real services (22, 25), so testing with your browser on those ports will not work.
So much for that. :oops:

hungtq
New user
New user
Posts: 7
Joined: 2021-06-19 03:03

Re: Can't send email to internet

Post by hungtq » 2021-06-20 03:07

palinka wrote:
2021-06-19 18:25
I think telnet is routing outbound traffic through any available port and since port 25 on these other servers is open, they respond. They respond by telnet to me as well. However, hmailserver connects via outbound port 25, so if that's blocked, then its blocked. I am no network engineer by a long shot. I could be completely wrong about all this, but I do know that some apps use random outgoing ports even though they're connecting to specific remote ports.

I just found this interesting outgoing port tester: http://52.47.209.216

It listens on all ports. If you have an outgoing port blocked, it will timeout. I tried it with http://52.47.209.216:25 and it timed out - and remember, telnet worked on port 25 at mail.hmailserver.com. However, trying http://52.47.209.216:26 or any other port works fine. Give it a try.

Edit -
Please also note that this server uses some port for real services (22, 25), so testing with your browser on those ports will not work.
So much for that. :oops:
thanks everyone for the support. exactly as you said. It went through another transmission. i rerouted and it worked!


Now I have another problem that IP is listed as spam of Spamhaus ZEN
123.25.5.18 is making SMTP connections with HELO values that use a bare IP address. This behavior is commonly associated with various botnets, and is a violation of the SMTP protocol as defined in RFC2821/5321 section 4.1.1.1.
making SMTP connections with HELO values that use a bare IP address

how to fix it

User avatar
mattg
Moderator
Moderator
Posts: 21516
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Can't send email to internet

Post by mattg » 2021-06-20 04:43

Run this an d post the results
viewtopic.php?f=20&t=30914

You need a FQDN in SMTP >> Delivery of email >> Local host name
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Virinum
Normal user
Normal user
Posts: 163
Joined: 2018-11-23 14:42
Location: Germany

Re: Can't send email to internet

Post by Virinum » 2021-06-20 09:34

Spamhaus is not the only blacklist your ip is listed in:
https://mxtoolbox.com/SuperTool.aspx?ac ... tworktools

Looking hat the result of this test, your hostname looks good:
https://mxtoolbox.com/SuperTool.aspx?ac ... tworktools

Being listed in these blacklist could be a relict of the actions the previous owner of your ip did.
Normally every blacklist provides a form for delisting.

palinka
Senior user
Senior user
Posts: 2779
Joined: 2017-09-12 17:57

Re: Can't send email to internet

Post by palinka » 2021-06-20 18:28

Virinum wrote:
2021-06-20 09:34
Spamhaus is not the only blacklist your ip is listed in:
https://mxtoolbox.com/SuperTool.aspx?ac ... tworktools
They look all PBL related. Presumably the OP is running his mail server on a residential dynamic IP. Like me. Except without 3rd party relaying. :D

To the OP: https://check.spamhaus.org/listed/?sear ... .190.45.10

stampaprints
New user
New user
Posts: 2
Joined: 2021-06-17 11:12
Contact:

Re: Can't send email to internet

Post by stampaprints » 2021-06-29 08:33

thanks for solving that error, I had been Facing the same error in past but you explain quit well

Post Reply