SMTP Relay - No mail servers could be found

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
NivekLR
New user
New user
Posts: 19
Joined: 2018-05-16 03:22

SMTP Relay - No mail servers could be found

Post by NivekLR » 2019-02-02 23:18

Hi everyone,

I've tried to use my gmail account as SMTP relay but the mail could not be sent to external addresses.
The error is this one :
Logs.jpg
But when I run a diagnostic test I have :
Diag.jpg
I have configured the Send mail as option on my gmail account.

Would anyone have an idea?

Kind regards,

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

Re: SMTP Relay - No mail servers could be found

Post by jimimaseye » 2019-02-02 23:29

run this and post the results: viewtopic.php?f=20&t=30914
HMS 5.6.6 B2383 on Win Server 2008 R2 Foundation, + 5.6.7-B2415 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

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

Re: SMTP Relay - No mail servers could be found

Post by mattg » 2019-02-03 02:38

In your internal diagnostics you have masked the SMTP Relayer address used to test

If that was gmail's address you wouldn't need to do that.

What do you have in your SMTP relayer section?
jimimaseye's diagnostics script will show that, so I agree, run the diagnostics in the link provided please
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

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

Re: SMTP Relay - No mail servers could be found

Post by palinka » 2019-02-03 14:35

Gmail will only relay mail from the gmail account address unless you have a paid g-suite account. The only way to relay mail from addresses other than the single gmail account address you're using to setup the relay is to upgrade to paid g-suite AND follow the instructions below.

https://support.google.com/a/answer/2956491?hl=en

NivekLR
New user
New user
Posts: 19
Joined: 2018-05-16 03:22

Re: SMTP Relay - No mail servers could be found

Post by NivekLR » 2019-02-03 15:40

Thank you for all your answers.

@jimimaseye - Here is the diag's result :

Code: Select all

2019-02-03   Hmailserver: 5.6.7-B2427

DOMAINS

   "Domain1.com" - klxxxxxxxxxx.ovx               Enabled: True

SIGNATURE         LIMITS                       DKIM               ADVANCED
  Enabled: False   Max size:                0   Enabled: True    
                   Max message size:        0   Header:   Relaxed  Plus addressing: False
                   Max size of accounts:    0   Body:     Relaxed
                                                Algorithm: SHA256  Greylisting:     False
                                                Private key: d:\wampserver\cert-auth\ca\intermediate\private\dkim.Domain1.com.pkey.pem
                                                Selector:    dkim
-----------------------------------------------------------------------------------------------

IP RANGES

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

  Allow connections                         Other
     SMTP:   True                              Antispam :   True
     POP3:   True                              Antivirus:   True
     IMAP:   True                              SSL/TLS:    False

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


IP: 0.0.0.0 - 255.255.255.255     Priority: 10     Name: Internet

  Allow connections                         Other
     SMTP:   True                              Antispam :   True
     POP3:   True                              Antivirus:   True
     IMAP:   True                              SSL/TLS:     True

  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 -  True              External To External -  True


------------------------------------------------------
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:  6 Mins: 10   Plain Text:        False  Bind: 
                     Host: EXTERNAL.TLD        Empty sender:       True  Batch recipients:   100
Max Msg Size: 20480  Relay:-                   Incorrect endings:  True  Use STARTTLS:      True
                      EXTERNAL.TLD  (ok)       Disc. on invalid:  False  Delivered-To hdr: False
                     Port: 465                                           Loop limit:           5
                     Req Auth: True *User Entered*                       Recipient hosts:     15
                     Con. Sec.: SSL/TLS
  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:  True    Verify DKIM:        True - 5    Use SA score:        True
              Subject Text: "[SPAM]"
  Spam delete threshold: 8         Maximum message size: 2048

DNSBL ENTRIES:
   No 'enabled' entries

SURBL ENTRIES:
   No 'enabled' entries

GREYLISTING:
  Greylisting:  False

WHITELISTING
   No entries
-----------------------------------------------------------------------------------------------

ANTIVIRUS

GENERAL:
  When found - Delete email. Notify Sender: False,  Notify Receiver: True

  Max Message Size: 26214
     CLAM AV:   True       Hostname: localhost    Port: 3310
     CLAMWIN:   False
     CUSTOMAV:  False

  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
   IMAP
       Certificate: D:\WAMPServer\cert-auth\ca\intermediate\certs\imap.Domain1.com.cert.pem
       Private key: D:\WAMPServer\cert-auth\ca\intermediate\private\imap.Domain1.com.pkey.pem
   POP
       Certificate: D:\WAMPServer\cert-auth\ca\intermediate\certs\pop.Domain1.com.cert.pem
       Private key: D:\WAMPServer\cert-auth\ca\intermediate\private\pop.Domain1.com.pkey.pem
   SMTP
       Certificate: D:\WAMPServer\cert-auth\ca\intermediate\certs\smtp.Domain1.com.cert.pem
       Private key: D:\WAMPServer\cert-auth\ca\intermediate\private\smtp.Domain1.com.pkey.pem
-----------------------------------------------------------------------------------------------

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         / 465   / SMTP   -   SSL/TLS             Cert: SMTP
               0.0.0.0         / 993   / IMAP   -   SSL/TLS             Cert: IMAP
               0.0.0.0         / 995   / POP3   -   SSL/TLS             Cert: POP
-----------------------------------------------------------------------------------------------

LOGGING      Logging Enabled: True

  Paths:-
    Current:  D:\WAMPPlugins\hMailServer\Logs\hmailserver_2019-02-03.log
    Error:    D:\WAMPPlugins\hMailServer\Logs\ERROR_hmailserver_2019-02-03.log
    Event:    D:\WAMPPlugins\hMailServer\Logs\hmailserver_events.log - Not present
    Awstats:  D:\WAMPPlugins\hMailServer\Logs\hmailserver_awstats.log
                        APPLICATION -    True
                        SMTP        -    True
                        POP3        -    True
                        IMAP        -    True
                        TCPIP       -    True
                        DEBUG       -      .
                        AWSTATS     -    True
-----------------------------------------------------------------------------------------------

SYSTEM TESTS

Database type: MySQL

IPv6 support is available in operating system.

Backup directory D:\WAMPBackup\hMailServer is writable.

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

There are no error logs in the log directory.
-----------------------------------------------------------------------------------------------

HMAILSERVER.INI

[Directories]
Program folder:  D:\WAMPPlugins\hMailServer\
Database folder: 
Data folder:     D:\WAMPPlugins\hMailServer\Data
Log folder:      D:\WAMPPlugins\hMailServer\Logs
Temp folder:     D:\WAMPPlugins\hMailServer\Temp
Event folder:    D:\WAMPPlugins\hMailServer\Events

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

Generated by HMSSettingsDiagnostics v1.95, Hmailserver Forum.

@mattg - My SMTP Relayer is configured as below :
Relay.jpg
Relay.jpg (22.43 KiB) Viewed 1238 times
@palinka - I have in the past (8 months ago appr.) succeed to send mail from my gmail account. Does an update in Google's services be applied to block this functionality ? If so, which free alternative I have ?

Kind regards,

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

Re: SMTP Relay - No mail servers could be found

Post by palinka » 2019-02-03 16:38

This gmail relay rule has been in place since forever.

You *may* be able to send from @not-gmail.com via smtp.gmail.com, but it will transform the sender to your user@gmail.com. I haven't tried that in a long time.

The correct way for relaying is through smtp-relay.gmail.com which can only be done through a paid g-suite account.

It's not that expensive and it's not a bad option if you don't mind Google snooping all of your outgoing mail. There are better options, IMHO.

By the way, i'm also using a relay since i'm on residential broadband that's blocking port 25 outgoing.

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

Re: SMTP Relay - No mail servers could be found

Post by jimimaseye » 2019-02-03 19:17

NivekLR wrote:
2019-02-02 23:18
Hi everyone,

I've tried to use my gmail account as SMTP relay but the mail could not be sent to external addresses.
The error is this one :
Logs.jpg
Can you post the SMTPC entries from hms (in text form, not an image) that match these delivery attempts.

[Entered by mobile. Excuse my spelling.]
HMS 5.6.6 B2383 on Win Server 2008 R2 Foundation, + 5.6.7-B2415 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

NivekLR
New user
New user
Posts: 19
Joined: 2018-05-16 03:22

Re: SMTP Relay - No mail servers could be found

Post by NivekLR » 2019-02-03 20:12

@jimimaseye - Here :

Code: Select all

"APPLICATION"	8928	"2019-02-03 14:20:30.445"	"SMTPDeliverer - Message 37: Delivering message from contact@xxx.xxx to person@xxx.xxx. File: D:\WAMPPlugins\hMailServer\Data\{40693B3C-C36B-46FA-9D4A-A7CA316C5215}.eml"
"APPLICATION"	8928	"2019-02-03 14:20:30.467"	"SMTPDeliverer - Message 37: Relaying to host smtp.gmail.com."
"APPLICATION"	8928	"2019-02-03 14:20:30.467"	"SMTPDeliverer - Message 37: No mail servers could be found for the address person@xxx.xxx."
"APPLICATION"	8928	"2019-02-03 14:20:30.467"	"SMTPDeliverer - Message 37: Message could not be delivered. Scheduling it for later delivery in 10 minutes."
"APPLICATION"	8928	"2019-02-03 14:20:30.467"	"SMTPDeliverer - Message 37: Message delivery thread completed."
Kind regards,

NivekLR
New user
New user
Posts: 19
Joined: 2018-05-16 03:22

Re: SMTP Relay - No mail servers could be found

Post by NivekLR » 2019-02-03 20:14

palinka wrote:
2019-02-03 16:38
This gmail relay rule has been in place since forever.

You *may* be able to send from @not-gmail.com via smtp.gmail.com, but it will transform the sender to your user@gmail.com. I haven't tried that in a long time.

The correct way for relaying is through smtp-relay.gmail.com which can only be done through a paid g-suite account.

It's not that expensive and it's not a bad option if you don't mind Google snooping all of your outgoing mail. There are better options, IMHO.

By the way, i'm also using a relay since i'm on residential broadband that's blocking port 25 outgoing.
What solution do you use as SMTP relay ?

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

Re: SMTP Relay - No mail servers could be found

Post by palinka » 2019-02-03 20:20

NivekLR wrote:
2019-02-03 20:14
What solution do you use as SMTP relay ?
I use smtp2go. They have a free option which has limitations, but if your usage falls within those limitations, you should give it a try. Or, try before you buy.

There are others too. You can search for "smtp relay service". Gmail is an option too. Their $5/user/month option includes relaying. They have limitations too, but they're pretty broad.

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

Re: SMTP Relay - No mail servers could be found

Post by mattg » 2019-02-03 23:07

Or you can just send directly from hMailserver...

jimimaseye wrote:
2019-02-03 19:17
Can you post the SMTPC entries from hms (in text form, not an image) that match these delivery attempts.
NivekLR wrote:
2019-02-03 20:12
@jimimaseye - Here :

Code: Select all

"APPLICATION"	8928	"2019-02-03 14:20:30.445"	"SMTPDeliverer - Message 37: Delivering message from contact@xxx.xxx to person@xxx.xxx. File: D:\WAMPPlugins\hMailServer\Data\{40693B3C-C36B-46FA-9D4A-A7CA316C5215}.eml"
"APPLICATION"	8928	"2019-02-03 14:20:30.467"	"SMTPDeliverer - Message 37: Relaying to host smtp.gmail.com."
"APPLICATION"	8928	"2019-02-03 14:20:30.467"	"SMTPDeliverer - Message 37: No mail servers could be found for the address person@xxx.xxx."
"APPLICATION"	8928	"2019-02-03 14:20:30.467"	"SMTPDeliverer - Message 37: Message could not be delivered. Scheduling it for later delivery in 10 minutes."
"APPLICATION"	8928	"2019-02-03 14:20:30.467"	"SMTPDeliverer - Message 37: Message delivery thread completed."
Kind regards,
These are all 'application' entries

We need to see SMTP entries, specifically SMTPC

Ensure that you have SMTP logging enabled please
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

NivekLR
New user
New user
Posts: 19
Joined: 2018-05-16 03:22

Re: SMTP Relay - No mail servers could be found

Post by NivekLR » 2019-02-04 11:58

Hello to all,

@mattg - SMTP Logging is activated but I have no error lines that contain "SMTP..."

I have decided to create an external server with Postfix to execute as a SMTP relay.
I have an issue that I will post in another topic :)

Thank you to all for your help !

Kind regards,

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

Re: SMTP Relay - No mail servers could be found

Post by mattg » 2019-02-04 13:03

On the 'protocols' branch of the admin GUI, can you confirm that SMTP is checked
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Post Reply