Send mail from Security Camera to gmail via hMailServer

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
fromPOK
New user
New user
Posts: 6
Joined: 2020-03-17 23:26

Send mail from Security Camera to gmail via hMailServer

Post by fromPOK » 2020-03-17 23:31

Hello - Newbie to email server setup.
Have security cameras that send email alerts to gmail account.
I did setup a hmailserver with private domain name (not registered) to collect email on the local hMailServer and send it to my private gmail account.
Log shows everything is successful. Nothing lands in my gmail email.
I have no MX certificates as there is no plan to receive email to this hMailServer.
Please help..

Setup Images:
in attachments
Capture4.JPG
Capture4.JPG
Capture5.JPG
LOG:
"SMTPD" 812 60 "2020-03-17 17:13:39.286" "192.168.29.21" "SENT: 220 gsmtp.gg.lcl ESMTP"
"SMTPD" 4028 60 "2020-03-17 17:13:39.302" "192.168.29.21" "RECEIVED: HELO RC80254D865E"
"SMTPD" 4028 60 "2020-03-17 17:13:39.302" "192.168.29.21" "SENT: 250 Hello."
"SMTPD" 812 60 "2020-03-17 17:13:39.302" "192.168.29.21" "RECEIVED: MAIL FROM: <home.gandham@gmail.com>"
"SMTPD" 812 60 "2020-03-17 17:13:39.317" "192.168.29.21" "SENT: 250 OK"
"SMTPD" 808 60 "2020-03-17 17:13:39.317" "192.168.29.21" "RECEIVED: RCPT TO: <ggandham@gmail.com>"
"SMTPD" 808 60 "2020-03-17 17:13:39.317" "192.168.29.21" "SENT: 250 OK"
"SMTPD" 812 60 "2020-03-17 17:13:39.333" "192.168.29.21" "RECEIVED: RCPT TO: <sridevigandham@gmail.com>"
"SMTPD" 812 60 "2020-03-17 17:13:39.333" "192.168.29.21" "SENT: 250 OK"
"SMTPD" 4028 60 "2020-03-17 17:13:39.349" "192.168.29.21" "RECEIVED: DATA"
"SMTPD" 4028 60 "2020-03-17 17:13:39.349" "192.168.29.21" "SENT: 354 OK, send."
"SMTPD" 4800 60 "2020-03-17 17:13:39.364" "192.168.29.21" "SENT: 250 Queued (0.016 seconds)"
"SMTPD" 812 60 "2020-03-17 17:13:39.380" "192.168.29.21" "RECEIVED: QUIT"

fromPOK
New user
New user
Posts: 6
Joined: 2020-03-17 23:26

Re: Send mail from Security Camera to gmail via hMailServer

Post by fromPOK » 2020-03-17 23:42

More Images
Attachments
Capture3.JPG
Capture2.JPG
Capture.JPG

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

Re: Send mail from Security Camera to gmail via hMailServer

Post by mattg » 2020-03-18 05:28

A couple of things


Your log, shows your server receibeing the message, not forwarding it to gmail
Look for SMTPC lines following that


ALSO

Your internet IP range should not allow external to external without AUTH, or your machine will be abused by spammers

Run this and show the results please
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

fromPOK
New user
New user
Posts: 6
Joined: 2020-03-17 23:26

Re: Send mail from Security Camera to gmail via hMailServer

Post by fromPOK » 2020-03-18 16:02

here r the diagnostics.. There is no SMPTC keyword in the whole log file. Thanks for your help.

Code: Select all

2020-03-18   Hmailserver: 5.6.7-B2425

DOMAINS

   "Domain1.com" - gg.lcx                         Enabled: True

SIGNATURE         LIMITS                       DKIM               ADVANCED
  Enabled: False   Max size:                0   Enabled: False   
                   Max message size:        0                      Plus addressing: False
                   Max size of accounts:    0                    
                                                                   Greylisting:     False
-----------------------------------------------------------------------------------------------

IP RANGES

IP: 192.168.29.0 - 192.168.29.255     Priority: 25     Name: home

  Allow connections                         Other
     SMTP:   True                              Antispam :  False
     POP3:  False                              Antivirus:  False
     IMAP:  False                              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: 0.0.0.0 - 255.255.255.255     Priority: 25     Name: Internet

  Allow connections                         Other
     SMTP:   True                              Antispam :  False
     POP3:  False                              Antivirus:  False
     IMAP:  False                              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:  False                              Antivirus:   True !! ANTIVIRUS NOT CONFIGURED !!
     IMAP:  False                              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


------------------------------------------------------
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: 
                     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: 587                                           Loop limit:           5
                     Req Auth: True *User Entered*                       Recipient hosts:     15
                     Con. Sec.: SSL/TLS
  Routes:
    Domain1.com              - S: Remote  R: Remote - Addr: All         (ok)

POP3
 !! Service Not Enabled !!

IMAP
 !! Service Not Enabled !!
-----------------------------------------------------------------------------------------------

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_2020-03-18.log  - !! NOT PRESENT !!
    Error:    C:\Program Files (x86)\hMailServer\Logs\ERROR_hmailserver_2020-03-18.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        -      .
                        IMAP        -      .
                        TCPIP       -      .
                        DEBUG       -      .
                        AWSTATS     -      .
-----------------------------------------------------------------------------------------------

SYSTEM TESTS

Database type: MSSQL Compact

IPv6 support is available in operating system.

Backup directory C:\Users\gsbn\Desktop 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: 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.

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

Re: Send mail from Security Camera to gmail via hMailServer

Post by palinka » 2020-03-18 16:43

Do routes use SMTPD or C?

I think the obvious thing to do is check your spam folder on gmail.

IF your message was actually sent (and its not yet clear that's the case, although the log appears to have sent it), then gmail is doing something with it. Likely they're marking it spam. Also, its possible they rejected it but you never received a NDR because you don't have an MX. I'm not sure how that would work - whether it would show up in your log or not.

fromPOK
New user
New user
Posts: 6
Joined: 2020-03-17 23:26

Re: Send mail from Security Camera to gmail via hMailServer

Post by fromPOK » 2020-03-18 17:29

I am trying to use SMTP
Nothing landed in the gmail spam
What's the difference between SMTPD vs SMTPC

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

Re: Send mail from Security Camera to gmail via hMailServer

Post by mattg » 2020-03-18 23:40

SMTPD is your server receiving a message
SMTPC is your server connecting to another server to send a message out

Please also run the internal diagnostics in hMailserver, and post the results of those
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

fromPOK
New user
New user
Posts: 6
Joined: 2020-03-17 23:26

Re: Send mail from Security Camera to gmail via hMailServer

Post by fromPOK » 2020-03-18 23:53

Mattg - Thank you. Here is the log
Test: Collect server details
hMailServer version: hMailServer 5.6.7-B2425
Database type: MSSQL Compact

Test: Test IPv6
IPv6 support is available in operating system.

Test: Test outbound port
SMTP relayer is in use.
Trying to connect to host smtp.gmail.com...
Trying to connect to TCP/IP address 173.194.207.109 on port 587.
Received: 220 smtp.gmail.com ESMTP c8sm210643qke.90 - gsmtp.
Connected successfully.

Test: Test backup directory
Backup directory C:\Users\gsbn\Desktop is writable.

Test: Test MX records
Trying to resolve MX records for gg.lcl...
ERROR: MX records for domain gg.lcl could not be resolved

Test: Test local connect
Connecting to TCP/IP address in MX records for local domain domain gg.lcl...
ERROR: MX records for local domain gg.lcl could not be resolved

Test: Test message file locations
Relative message paths are stored in the database for all messages.

Test: Test IP range configuration
No problems were found in the IP range configuration.

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

Re: Send mail from Security Camera to gmail via hMailServer

Post by mattg » 2020-03-19 06:11

That looks OK

Rename today's log, Enable all logging, force a message send, wait at least 90 seconds, then post all logs created 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

fromPOK
New user
New user
Posts: 6
Joined: 2020-03-17 23:26

Re: Send mail from Security Camera to gmail via hMailServer

Post by fromPOK » 2020-03-20 15:11

Matt - I figured out the issues. Something to do with gmail port 587 vs 465. If I change port to 465.. the program works.
But the debug screen gives coredump with port 465. with 587 I can get proper debug information. Is this a known issue?

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

Re: Send mail from Security Camera to gmail via hMailServer

Post by palinka » 2020-03-20 15:14

fromPOK wrote:
2020-03-20 15:11
Matt - I figured out the issues. Something to do with gmail port 587 vs 465. If I change port to 465.. the program works.
But the debug screen gives coredump with port 465. with 587 I can get proper debug information. Is this a known issue?
Yes, this is a known issue - only on port 465. You'll have to test it the old fashioned way - by sending a message and checking the other end to see if it goes through.

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

Re: Send mail from Security Camera to gmail via hMailServer

Post by mattg » 2020-03-21 00:31

fromPOK wrote:
2020-03-20 15:11
Matt - I figured out the issues. Something to do with gmail port 587 vs 465. If I change port to 465.. the program works.
But the debug screen gives coredump with port 465. with 587 I can get proper debug information. Is this a known issue?
That's ONLY for the diagnostics test screen - affects nothing else

For connections to gMail (SMTPrelayer)
465 is SSL/TLS for connection security
587 is StartTLS Required

I see now that you have that wrong in the diagnostics...
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