Can hmailserver do this for me?

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
bamia
New user
New user
Posts: 7
Joined: 2019-09-30 05:33

Can hmailserver do this for me?

Post by bamia » 2019-09-30 05:41

Hello everyone,

I will try to detailed but brief.

I have a PLC with a program to communicate via TCP and it send email via SMTP port 25. That is not changeable.
I could not get this functionality to work and there are two possibilities:
1-The program is incorrect and has to be fixed.
2-The PLC is attempting to send email but it is blocked either by my ISP or my router or anything else other than the PLC.

Can intercept, transfer, re-route (whatever the proper terminology is) to hmailserver so I can determine if where the problem is? I don't care if the email leave my computer I just want to see some sort of a log of it or not.

I installed hmailserver and tried to get it to work but it is exhausting trying to learn too many things that really do not in any way interest me so I thought I should ask.

Thanks a lot

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

Re: Can hmailserver do this for me?

Post by mattg » 2019-09-30 09:04

Just install hmailserver, don't change ANY settings EXCEPT add an SMTP route that points to your other server (eg GMAIL) including credentials and port other than 25 (Gmail like many others accepts mail on port 587 using STartTLS or port 465 via SSL)

THEN add an IP range for your LAN, allowing external to external WITHOUT AUTH (Only for your LAN, NOT for the internet)

Open the windows firewall for port 25 on the machine that hmailserver is installed on

Then point your PLC program to the hmailserver IP address

It should just work
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

bamia
New user
New user
Posts: 7
Joined: 2019-09-30 05:33

Re: Can hmailserver do this for me?

Post by bamia » 2019-10-01 07:33

Thanks mattg. I resolved most of the issues and have one that I can not figure out after hours of searching and reading which is "550 A valid address is required"
I understand that is a result of "RCPT TO:" being blank. If that I'm correct why are there two lines of "RCPT TO" ?

Thanks

"SMTPD" 8960 389 "2019-09-30 23:27:41.790" "104.205.96.30" "SENT: 220 KAL-PC ESMTP"
"SMTPD" 11540 389 "2019-09-30 23:27:41.836" "104.205.96.30" "RECEIVED: EHLO TMAIL_C"
"SMTPD" 11540 389 "2019-09-30 23:27:41.837" "104.205.96.30" "SENT: 250-KAL-PC[nl]250-SIZE 20480000[nl]250-AUTH LOGIN[nl]250 HELP"
"SMTPD" 8936 389 "2019-09-30 23:27:41.902" "104.205.96.30" "RECEIVED: MAIL FROM:<kal@mywebiste.ca>"
"SMTPD" 8936 389 "2019-09-30 23:27:41.904" "104.205.96.30" "SENT: 250 OK"
"SMTPD" 11540 389 "2019-09-30 23:27:41.931" "104.205.96.30" "RECEIVED: RCPT TO:<kal@mywebsite.ca>"
"SMTPD" 11540 389 "2019-09-30 23:27:41.933" "104.205.96.30" "SENT: 250 OK"
"SMTPD" 8960 389 "2019-09-30 23:27:41.944" "104.205.96.30" "RECEIVED: RCPT TO:"
"SMTPD" 8960 389 "2019-09-30 23:27:41.945" "104.205.96.30" "SENT: 550 A valid address is required."
"SMTPD" 8936 389 "2019-09-30 23:27:41.975" "104.205.96.30" "RECEIVED: DATA"
"SMTPD" 8936 389 "2019-09-30 23:27:41.976" "104.205.96.30" "SENT: 354 OK, send."
"SMTPD" 9580 389 "2019-09-30 23:27:42.043" "104.205.96.30" "SENT: 250 Queued (0.064 seconds)"
"SMTPD" 11540 389 "2019-09-30 23:27:42.050" "104.205.96.30" "RECEIVED: QUIT"

bamia
New user
New user
Posts: 7
Joined: 2019-09-30 05:33

Re: Can hmailserver do this for me?

Post by bamia » 2019-10-01 07:40

Ok, so I added and email address in CC and now have no errors but I haven't received any emails :mrgreen:

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

Re: Can hmailserver do this for me?

Post by mattg » 2019-10-01 15:50

550 A valid address is required

hMailServer issues this error message if a SMTP client tries to specify a recipient address which is not valid (which has an incorrect syntax).
https://www.hmailserver.com/documentati ... sages_smtp
bamia wrote:
2019-10-01 07:40
but I haven't received any emails
Show more logs please

Also run this and post the results
viewtopic.php?f=20&t=30914
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

bamia
New user
New user
Posts: 7
Joined: 2019-09-30 05:33

Re: Can hmailserver do this for me?

Post by bamia » 2019-10-01 19:19

Hello mattg,

Here's more logs. That line with PC[nl]250-SIZE 20480000[nl]250-AUTH LOGIN[nl]250 HELP, is that a problem?

Code: Select all


"SMTPD"	8960	586	"2019-10-01 00:31:49.455"	"104.205.96.30"	"SENT: 220 KAL-PC ESMTP"
"SMTPD"	9516	586	"2019-10-01 00:31:49.506"	"104.205.96.30"	"RECEIVED: EHLO TMAIL_C"
"SMTPD"	9516	586	"2019-10-01 00:31:49.507"	"104.205.96.30"	"SENT: 250-KAL-PC[nl]250-SIZE 20480000[nl]250-AUTH LOGIN[nl]250 HELP"
"SMTPD"	4240	586	"2019-10-01 00:31:49.561"	"104.205.96.30"	"RECEIVED: MAIL FROM:<kal@mywebsite.ca>"
"SMTPD"	4240	586	"2019-10-01 00:31:49.563"	"104.205.96.30"	"SENT: 250 OK"
"SMTPD"	8960	586	"2019-10-01 00:31:49.596"	"104.205.96.30"	"RECEIVED: RCPT TO:kal@mywebsite.ca"
"SMTPD"	8960	586	"2019-10-01 00:31:49.598"	"104.205.96.30"	"SENT: 250 OK"
"SMTPD"	4240	586	"2019-10-01 00:31:49.611"	"104.205.96.30"	"RECEIVED: RCPT TO:kal@mywebsite.ca"
"SMTPD"	4240	586	"2019-10-01 00:31:49.613"	"104.205.96.30"	"SENT: 250 OK"
"SMTPD"	8960	586	"2019-10-01 00:31:49.653"	"104.205.96.30"	"RECEIVED: DATA"
"SMTPD"	8960	586	"2019-10-01 00:31:49.654"	"104.205.96.30"	"SENT: 354 OK, send."
"SMTPD"	9580	586	"2019-10-01 00:31:49.691"	"104.205.96.30"	"SENT: 250 Queued (0.032 seconds)"
"SMTPD"	4240	586	"2019-10-01 00:31:49.698"	"104.205.96.30"	"RECEIVED: QUIT"
"SMTPD"	4240	586	"2019-10-01 00:31:49.698"	"104.205.96.30"	"SENT: 221 goodbye"
"SMTPD"	8960	589	"2019-10-01 00:39:35.258"	"104.205.96.30"	"SENT: 220 KAL-PC ESMTP"
"SMTPD"	8960	589	"2019-10-01 00:39:35.313"	"104.205.96.30"	"RECEIVED: EHLO TMAIL_C"
"SMTPD"	8960	589	"2019-10-01 00:39:35.314"	"104.205.96.30"	"SENT: 250-KAL-PC[nl]250-SIZE 20480000[nl]250-AUTH LOGIN[nl]250 HELP"
"SMTPD"	4240	589	"2019-10-01 00:39:35.352"	"104.205.96.30"	"RECEIVED: MAIL FROM:<kal@mywebsite.ca>"
"SMTPD"	4240	589	"2019-10-01 00:39:35.354"	"104.205.96.30"	"SENT: 250 OK"
"SMTPD"	4240	589	"2019-10-01 00:39:35.378"	"104.205.96.30"	"RECEIVED: RCPT TO:kal@mywebsite.ca"
"SMTPD"	4240	589	"2019-10-01 00:39:35.380"	"104.205.96.30"	"SENT: 250 OK"
"SMTPD"	9516	589	"2019-10-01 00:39:35.387"	"104.205.96.30"	"RECEIVED: RCPT TO:kal@mywebsite.ca"
"SMTPD"	9516	589	"2019-10-01 00:39:35.390"	"104.205.96.30"	"SENT: 250 OK"
"SMTPD"	4240	589	"2019-10-01 00:39:35.396"	"104.205.96.30"	"RECEIVED: DATA"
"SMTPD"	4240	589	"2019-10-01 00:39:35.396"	"104.205.96.30"	"SENT: 354 OK, send."
"SMTPD"	9580	589	"2019-10-01 00:39:35.437"	"104.205.96.30"	"SENT: 250 Queued (0.032 seconds)"
"SMTPD"	11540	589	"2019-10-01 00:39:35.443"	"104.205.96.30"	"RECEIVED: QUIT"
"SMTPD"	11540	589	"2019-10-01 00:39:35.443"	"104.205.96.30"	"SENT: 221 goodbye"
"SMTPD"	8960	604	"2019-10-01 00:42:32.233"	"104.205.96.30"	"SENT: 220 KAL-PC ESMTP"
"SMTPD"	9516	604	"2019-10-01 00:42:32.271"	"104.205.96.30"	"RECEIVED: EHLO TMAIL_C"
"SMTPD"	9516	604	"2019-10-01 00:42:32.271"	"104.205.96.30"	"SENT: 250-KAL-PC[nl]250-SIZE 20480000[nl]250-AUTH LOGIN[nl]250 HELP"
"SMTPD"	8960	604	"2019-10-01 00:42:32.339"	"104.205.96.30"	"RECEIVED: MAIL FROM:<kal@mywebsite.ca>"
"SMTPD"	8960	604	"2019-10-01 00:42:32.341"	"104.205.96.30"	"SENT: 250 OK"
"SMTPD"	9516	604	"2019-10-01 00:42:32.378"	"104.205.96.30"	"RECEIVED: RCPT TO:kal@mywebsite.ca"
"SMTPD"	9516	604	"2019-10-01 00:42:32.380"	"104.205.96.30"	"SENT: 250 OK"
"SMTPD"	11540	604	"2019-10-01 00:42:32.391"	"104.205.96.30"	"RECEIVED: RCPT TO:kal@mywebsite.ca"
"SMTPD"	11540	604	"2019-10-01 00:42:32.394"	"104.205.96.30"	"SENT: 250 OK"
"SMTPD"	8960	604	"2019-10-01 00:42:32.402"	"104.205.96.30"	"RECEIVED: DATA"
"SMTPD"	8960	604	"2019-10-01 00:42:32.402"	"104.205.96.30"	"SENT: 354 OK, send."
"SMTPD"	9580	604	"2019-10-01 00:42:32.440"	"104.205.96.30"	"SENT: 250 Queued (0.032 seconds)"
"SMTPD"	11540	604	"2019-10-01 00:42:32.475"	"104.205.96.30"	"RECEIVED: QUIT"
Last edited by bamia on 2019-10-01 19:21, edited 1 time in total.

bamia
New user
New user
Posts: 7
Joined: 2019-09-30 05:33

Re: Can hmailserver do this for me?

Post by bamia » 2019-10-01 19:20

Here is the diagnostic results:

Code: Select all

2019-10-01   Hmailserver: 5.6.7-B2425

DOMAINS
     (No Domains Entered)

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

IP RANGES

IP: 104.205.96.30 - 104.205.96.32     Priority: 25     Name: plc

  Allow connections                         Other
     SMTP:   True                              Antispam :  False
     POP3:   True                              Antivirus:  False
     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 - False


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

  Allow connections                         Other
     SMTP:   True                              Antispam :   True !! 'Spam tests' not enabled !!
     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       - 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 !! 'Spam tests' not enabled !!
     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 -  True              External To External -  True


   !!  Warning:  DEFAULT DOMAIN is SET  !! - "EXTERNAL.TLD"
------------------------------------------------------
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:        False  Bind: 
                     Host: Domain0.com         Empty sender:       True  Batch recipients:   100
Max Msg Size: 20480  Relay:-                   Incorrect endings:  True  Use STARTTLS:      True
                     (none entered)            Disc. on invalid:  False  Delivered-To hdr: False
                                                                         Loop limit:           5
                                                                         Recipient hosts:     15
  Routes:
    toxxxxxxxxxxxxx.ca       - S: Local   R: Local  - Addr: All         !! Target does not resolve !!

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:           False        Use Spamassassin:   False
  Add X-HmailServer-Spam:     True    Check HELO host:   False    
  Add X-HmailServer-Reason:   True    Check MX records:  False    
  Add X-HmailServer-Subject: False    Verify DKIM:       False    

  Spam delete threshold: 20         Maximum message size: 1024

DNSBL ENTRIES:
   No 'enabled' entries

SURBL ENTRIES:
   No 'enabled' entries

GREYLISTING:
  Greylisting:  False

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

ANTIVIRUS:  No application configured.

  Block Attachments: False
-----------------------------------------------------------------------------------------------

SSL CERTIFICATES
   No entries
-----------------------------------------------------------------------------------------------

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         / 587   / SMTP   -   None                
-----------------------------------------------------------------------------------------------

LOGGING      Logging Enabled: True

  Paths:-
    Current:  C:\Program Files (x86)\hMailServer\Logs\hmailserver_2019-10-01.log
    Error:    C:\Program Files (x86)\hMailServer\Logs\ERROR_hmailserver_2019-10-01.log
    Event:    C:\Program Files (x86)\hMailServer\Logs\hmailserver_events.log - Not present
    Awstats:  C:\Program Files (x86)\hMailServer\Logs\hmailserver_awstats.log
                        APPLICATION -      .
                        SMTP        -    True
                        POP3        -    True
                        IMAP        -    True
                        TCPIP       -      .
                        DEBUG       -      .
                        AWSTATS     -      .
-----------------------------------------------------------------------------------------------

SYSTEM TESTS

Database type: MSSQL Compact

IPv6 support is available in operating system.

ERROR: Backup directory has not been specified.

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

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

HMAILSERVER.INI

[Directories]
Program folder:  C:\Program Files (x86)\hMailServer\
Database folder: C:\Program Files (x86)\hMailServer\Database
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=              MSSQLCE
Username=           
PasswordEncryption=1
Port=              0
Server=             
Internal=          1
-----------------------------------------------------------------------------------------------

Generated by HMSSettingsDiagnostics v1.98, Hmailserver Forum.

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

Re: Can hmailserver do this for me?

Post by mattg » 2019-10-02 01:40

bamia wrote:
2019-10-01 19:19
Here's more logs. That line with PC[nl]250-SIZE 20480000[nl]250-AUTH LOGIN[nl]250 HELP, is that a problem?
No, that's fine

That is your server detailing what it can do

That log shows 3 messages accepted normally

Can you also enable Application, debug and TCPIP logging and try to send another message

As for your diagnostics, there are two small issues which probably don't affect your issue
#1 you have a default domain set - remove that unless you KNOW that you need it please
#2 The SMTP route that is set doesn't resolve

If that route matches the recipient in your test email - that MAY be your problem
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

bamia
New user
New user
Posts: 7
Joined: 2019-09-30 05:33

Re: Can hmailserver do this for me?

Post by bamia » 2019-10-02 03:55

Thanks mattg. I will have to admit defeat and move on as I spent too much time troubleshooting software that I wanted to use to troubleshoot a PLC!!!!!!!!!!!
That is just insane.

Thanks Again.

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

Re: Can hmailserver do this for me?

Post by mattg » 2019-10-02 03:58

This really should be easy

But you are correct the PLC should allow proper email server configurations
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

bamia
New user
New user
Posts: 7
Joined: 2019-09-30 05:33

Re: Can hmailserver do this for me?

Post by bamia » 2019-10-02 05:37

Thanks mattg. I got it working and I'm sure it's easy for those who know what they're doing and that's where I fail as I have very little understanding of networking and TCP/IP and all that. I would love to learn and most certainly will set time for it in the next months. For now I got it working by trial and error and by looking and the debug as you suggested.

Thanks a lot. Very much appreciated.

Post Reply