Help with routes

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
palinka
Senior user
Senior user
Posts: 1276
Joined: 2017-09-12 17:57

Help with routes

Post by palinka » 2019-09-26 22:15

I was never good with routes. I'm clearly lacking in understanding something. Running hmailserver 5.7.0 and using a paid relay service.

Company has a google apps domain example.com set up with several mailboxes hosted by gmail, including me@example.com.

On hmailserver, I set up new domain example.com and added one account: me@example.com. I plan to download from gmail via pop3.

I set up a route per the documentation:
Example 1 - Creating a new route
The following example explains how to configure all email for the domain hmailserver.com to go through mx.hmailserver.com instead of through the default server, mail.hmailserver.com:
Start hMailServer Administrator
Go to Settings -> Protocols -> SMTP -> Routes
Click on Add
In the Domain field, enter hmailserver.com
In the Target SMTP host field, enter mx.hmailserver.com.
Click on Save
Henceforth, all email sent to hMailServer.com will go through mx.hmailserver.com, instead of through the default server, mail.hmailserver.com.
I entered example.com in the domain field, filled in the target host with smtp.gmail.com, port 587, starttls, authentication details on delivery tab. Then I sent a test message which did not get delivered through gmail. So I played with "when sender/recipient matches route" - I matched all 4 possible combinations and still every test message went through the relay service instead of gmail. Yes, I hit "save" after each change. :D

I'm at a loss here. I can't figure out what I'm doing wrong. Is it possible there could be a bug with routes in 5.7.0?

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

Re: Help with routes

Post by mattg » 2019-09-26 23:17

I set Sender = remote, recipient = local

The remote / local thing is for IP ranges, and whether or not to require AUTH
If you are doing POP3 external downloads for this account, you may want remote, remote but that will stop you sending to THAT account from one of your other hMailserver accounts

I have just one similar account...and it's not a gmail hosted account, and I don't need to AUTH to use the route

It works fine
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: 1276
Joined: 2017-09-12 17:57

Re: Help with routes

Post by palinka » 2019-09-27 00:10

mattg wrote:
2019-09-26 23:17
I set Sender = remote, recipient = local

The remote / local thing is for IP ranges, and whether or not to require AUTH
If you are doing POP3 external downloads for this account, you may want remote, remote but that will stop you sending to THAT account from one of your other hMailserver accounts

I have just one similar account...and it's not a gmail hosted account, and I don't need to AUTH to use the route

It works fine
No dice. I tried both remote/local and remote/remote (I also tried them before, but just to be sure...). No worky. Still being delivered "normally" instead of through the route. I will restart hmailserver service in a bit - downloading the me@example.com messages at the moment. Will report back if that changes anything.

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

Re: Help with routes

Post by jimimaseye » 2019-09-27 00:18

Let's see the setup: run this and post the results: https://www.hmailserver.com/forum/viewt ... 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: 20284
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Help with routes

Post by mattg » 2019-09-27 01:06

As a test, I set a route for gmail.com using my gmail account credentials on port 465

I can clearly see that delivery is done on port 465, using my credentials to AUTH on the gmail server

In addition to the diagnostics, show some logs please

My logs include this
"APPLICATION" 7776 "2019-09-27 09:01:57.657" "SMTPDeliverer - Message 1231379: Relaying to host smtp.gmail.com."
"DEBUG" 7776 "2019-09-27 09:01:57.657" "Starting external delivery process. Server: smtp.gmail.com (74.125.24.108), Port: 465, Security: 1, User name: mattg#####@gmail.com"
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: 1276
Joined: 2017-09-12 17:57

Re: Help with routes

Post by palinka » 2019-09-27 01:34

Will do. Still moving mail. Big mailbox going back 8 years. As soon as that's done i will restart hmail, try again, post logs.

By the way, i downloaded the latest Thunderbird and was able to move a 30k message inbox without any errors. I had problems when i tried it before with a previous version. It would only take a couple hundred messages at a time before mysteriously quitting. The other version was a portable version, so maybe that had something to do with it.

User avatar
jim.bus
Senior user
Senior user
Posts: 304
Joined: 2011-05-28 11:49
Location: US

Re: Help with routes

Post by jim.bus » 2019-09-27 09:01

palinka wrote:
2019-09-26 22:15
I was never good with routes. I'm clearly lacking in understanding something. Running hmailserver 5.7.0 and using a paid relay service.

Company has a google apps domain example.com set up with several mailboxes hosted by gmail, including me@example.com.

On hmailserver, I set up new domain example.com and added one account: me@example.com. I plan to download from gmail via pop3.
I am probably more confused than you but I have been wanting to understand Routes a bit myself so I looked at your problem to see if I can get a better understanding myself and I have these questions.
1. If I read correctly what you are trying to do, you want to download from me@example.com located on GMail Server to the same email account me@example.com located on your hMailServer (me@example.com).
2. You are not wanting to send email to me@example.com located on hMailServer to be delivered to me@example.com (located on GMail).
3. Email sent to me@example.com (GMail) from some Sender external to hMailServer should be downloaded to me@example.com (hMailServer).

As I read the Help Documentation on hMailServer, Routes deliver email to the Target Server hostname. With the Route you specified this is how I understand what would happen:
1. Email sent from me@example.com (located on hMailServer) would be sent to me@example.com (located on hMailServer). This is because according to the Help Documentation, hMailServer will send the email to hMailServer if the recipient Email Id (me@example.com) exists locally on hMailServer (me@example.com exists on your hMailServer).
2. I interpret the IP Range set up to define what is considered local or external domains on the Target Hostname (GMail.Com in your example). So if i read the Help Documentation correctly your email sent from hMailServer would never leave hMailServer.
3. However, Matt seems to believe he has done this and I would trust Matt's understanding better than mine as I am just now really trying to interpret the Help Documentation.

However again if I read the Help Documentation correctly and I have correctly understood what you want to do is really to download using POP3 from me@example.com (located on GMail) then I would believe you should be using on hMailServer Domains>example.com>me@example.com then select External Accounts Tab. The following instructions would be what I would think you would want to do:

From the Help Documentation:

Using the external account functionality, you can configure hMailServer to download email from other e-mail servers, using the POP3 protocol. After the messages have been downloaded, global rules, virus scanning and etc are applied on the messages. After that, they are normally delivered to one or several local accounts.

Scenario 1:

You have a hMailServer installation where you host email for your domain. You want to download email from another email server and put it in one of the local accounts.

Steps
1.Open the account settings for the account you want to download email to (In Your Example the account would be me@example.com).
2.Select the External accounts tab
3.Click Add to add a new account.
4.Enter a name for the external account.
5.Enter the login information. (Presumably in your example this would GMail account me@example.com and its Password).
6.De-select "Deliver to recipients in MIME-headers" (if it is selected)
7.Specify how often you want hMailServer to download messages, and how long they should be stoerd on the remote POP3 server.
8.Save the account

After you have performed the steps above, hMailServer will download the messages and put them in the account in which you created the external account.

END OF Help Documentation External Accounts.

However if you use me@example.com also on your hMailServer then I do not believe you would be able to send to me@example.com (located on GMail.com) as hMailServer would send to me@example.com located on hMailServer. Now for this if you wanted to send with me@example.com to external email addresses then possibly a Route would be appropriate.

Again as I read the Help Documentation, Routes looked like they were used to send to External Servers not receive from External Servers. External Accounts looked like they were intended to be used to receive from External Email Servers.

Disclaimer: I know nothing about Routes and/or External Accounts save for what I read in the Help Documentation which was confusing enough to read and decipher but then who knows maybe I got it close to right.

User avatar
katip
Senior user
Senior user
Posts: 701
Joined: 2006-12-22 07:58
Location: Istanbul

Re: Help with routes

Post by katip » 2019-09-27 10:25

to my knowledge, routes are good for outbound mail.
HMS first looks if recipient is local, if yes it delivers to local mailbox
if not it looks if a route is defined for this recipient (or it's whole domain)
if yes, it uses this route to send out
otherwise mail goes out to relayer or by end-to-end delivery, as set up in SMTP section.

but "treat sender as..." part is confusing indeed :P
Katip
--
HMS 5.7.0-B2428-LTS-64-bit, MySQL 5.7.24, SA 3.4.2, ClamAV 0.101.2 + SaneS

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

Re: Help with routes

Post by mattg » 2019-09-27 11:56

Say I have a route on my server 'example.com'

If someone sends from 'not-hosted-on-my-server@example.com' to an address on my server, the route setting will determine in the sender needs to AUTH or not in IP ranges

You wouldn't ask someone with any old gmail address to Authenticate on your server just because you have a gMail route set
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: 1276
Joined: 2017-09-12 17:57

Re: Help with routes

Post by palinka » 2019-09-27 12:29

Had to sleep on it. Still failing. I tried restarting and that didn't help. Here's the log. Will also run Jimi's diagnostic immediately after.

Log for one completed transaction. Sending mail via webmail from me@example.com to a different domain local account. This *should* get relayed through gmail and sent back to me. I have remote/remote checked for "sender/recipient matches".

Code: Select all

"TCPIP"	5552	"2019-09-27 06:11:05.357"	"TCP - 127.0.0.1 connected to 127.0.0.1:587."
"DEBUG"	5552	"2019-09-27 06:11:05.357"	"Executing event OnClientConnect"
"DEBUG"	5552	"2019-09-27 06:11:05.357"	"Event completed"
"DEBUG"	5552	"2019-09-27 06:11:05.373"	"TCP connection started for session 5"
"SMTPD"	5552	5	"2019-09-27 06:11:05.373"	"127.0.0.1"	"SENT: 220 my.helo.banner"
"SMTPD"	5552	5	"2019-09-27 06:11:05.373"	"127.0.0.1"	"RECEIVED: EHLO my.helo.banner"
"DEBUG"	5552	"2019-09-27 06:11:05.373"	"Executing event OnHELO"
"DEBUG"	5552	"2019-09-27 06:11:05.373"	"Event completed"
"SMTPD"	5552	5	"2019-09-27 06:11:05.373"	"127.0.0.1"	"SENT: 250-my.helo.banner[nl]250-SIZE 41943040[nl]250-STARTTLS[nl]250-AUTH LOGIN[nl]250 HELP"
"SMTPD"	5532	5	"2019-09-27 06:11:05.373"	"127.0.0.1"	"RECEIVED: STARTTLS"
"SMTPD"	5532	5	"2019-09-27 06:11:05.388"	"127.0.0.1"	"SENT: 220 Ready to start TLS"
"DEBUG"	5552	"2019-09-27 06:11:05.388"	"Performing SSL/TLS handshake for session 5. Verify certificate: False"
"TCPIP"	5540	"2019-09-27 06:11:05.482"	"TCPConnection - TLS/SSL handshake completed. Session Id: 5, Remote IP: 127.0.0.1, Version: TLSv1.2, Cipher: ECDHE-RSA-AES128-GCM-SHA256, Bits: 128"
"SMTPD"	5532	5	"2019-09-27 06:11:05.482"	"127.0.0.1"	"RECEIVED: EHLO my.helo.banner"
"DEBUG"	5532	"2019-09-27 06:11:05.482"	"Executing event OnHELO"
"DEBUG"	5532	"2019-09-27 06:11:05.498"	"Event completed"
"SMTPD"	5532	5	"2019-09-27 06:11:05.498"	"127.0.0.1"	"SENT: 250-my.helo.banner[nl]250-SIZE 41943040[nl]250-AUTH LOGIN[nl]250 HELP"
"SMTPD"	5540	5	"2019-09-27 06:11:05.498"	"127.0.0.1"	"RECEIVED: AUTH LOGIN"
"SMTPD"	5540	5	"2019-09-27 06:11:05.498"	"127.0.0.1"	"SENT: 334 VXNlcm5hbWU6"
"SMTPD"	5552	5	"2019-09-27 06:11:05.498"	"127.0.0.1"	"RECEIVED: [REDACTED]"
"SMTPD"	5552	5	"2019-09-27 06:11:05.498"	"127.0.0.1"	"SENT: 334 UGFzc3dvcmQ6"
"SMTPD"	5540	5	"2019-09-27 06:11:05.498"	"127.0.0.1"	"RECEIVED: ***"
"DEBUG"	5540	"2019-09-27 06:11:05.513"	"Executing event OnClientLogon"
"DEBUG"	5540	"2019-09-27 06:11:05.623"	"Event completed"
"SMTPD"	5540	5	"2019-09-27 06:11:05.623"	"127.0.0.1"	"SENT: 235 authenticated."
"SMTPD"	5552	5	"2019-09-27 06:11:05.623"	"127.0.0.1"	"RECEIVED: MAIL FROM:<me@example.com>"
"SMTPD"	5552	5	"2019-09-27 06:11:05.623"	"127.0.0.1"	"SENT: 250 OK"
"SMTPD"	5532	5	"2019-09-27 06:11:05.623"	"127.0.0.1"	"RECEIVED: RCPT TO:<email@mylocaldomain.tld>"
"SMTPD"	5532	5	"2019-09-27 06:11:05.638"	"127.0.0.1"	"SENT: 250 OK"
"SMTPD"	5540	5	"2019-09-27 06:11:05.638"	"127.0.0.1"	"RECEIVED: DATA"
"DEBUG"	5540	"2019-09-27 06:11:05.638"	"Executing event OnSMTPData"
"DEBUG"	5540	"2019-09-27 06:11:05.638"	"Event completed"
"SMTPD"	5540	5	"2019-09-27 06:11:05.638"	"127.0.0.1"	"SENT: 354 OK, send."
"DEBUG"	5552	"2019-09-27 06:11:05.638"	"Could not retrieve PTR record for IP (false)! 127.0.0.1"
"DEBUG"	5552	"2019-09-27 06:11:05.654"	"Adding task AsynchronousTask to work queue Asynchronous task queue"
"DEBUG"	5360	"2019-09-27 06:11:05.654"	"Executing task AsynchronousTask in work queue Asynchronous task queue"
"DEBUG"	5360	"2019-09-27 06:11:05.654"	"Executing event OnAcceptMessage"
"DEBUG"	5360	"2019-09-27 06:11:05.670"	"Event completed"
"DEBUG"	5360	"2019-09-27 06:11:05.670"	"Saving message: {AB0741C3-BF85-43A3-984F-FA16F152BBB4}.eml"
"DEBUG"	5360	"2019-09-27 06:11:05.685"	"Requesting SMTPDeliveryManager to start message delivery"
"SMTPD"	5360	5	"2019-09-27 06:11:05.685"	"127.0.0.1"	"SENT: 250 Queued (0.015 seconds)"
"SMTPD"	5532	5	"2019-09-27 06:11:05.685"	"127.0.0.1"	"RECEIVED: QUIT"
"SMTPD"	5532	5	"2019-09-27 06:11:05.685"	"127.0.0.1"	"SENT: 221 goodbye"
"DEBUG"	5540	"2019-09-27 06:11:05.685"	"Ending session 5"
"DEBUG"	5372	"2019-09-27 06:11:05.701"	"Adding task DeliveryTask to work queue SMTP delivery queue"
"DEBUG"	5416	"2019-09-27 06:11:05.701"	"Executing task DeliveryTask in work queue SMTP delivery queue"
"DEBUG"	5416	"2019-09-27 06:11:05.701"	"Delivering message..."
"APPLICATION"	5416	"2019-09-27 06:11:05.701"	"SMTPDeliverer - Message 411028: Delivering message from me@example.com to email@mylocaldomain.tld. File: X:\HMS-DATA\Data\{AB0741C3-BF85-43A3-984F-FA16F152BBB4}.eml"
"DEBUG"	5416	"2019-09-27 06:11:05.701"	"Connecting to ClamAV virus scanner..."
"DEBUG"	5416	"2019-09-27 06:11:05.701"	"Connecting to ClamAV stream port..."
"DEBUG"	5540	"2019-09-27 06:11:05.732"	"Saving message: {F0FD0033-C9D9-4C58-B477-39269DC7C80F}.eml"
"DEBUG"	5560	"2019-09-27 06:11:05.882"	"Ending session 45"
"DEBUG"	5480	"2019-09-27 06:11:06.651"	"No messages to index."
"DEBUG"	5416	"2019-09-27 06:11:06.791"	"No virus detected: stream: OK"
"DEBUG"	5416	"2019-09-27 06:11:06.791"	"Applying rules"
"DEBUG"	5416	"2019-09-27 06:11:06.791"	"Applying rule Dingbat Messages"
"DEBUG"	5416	"2019-09-27 06:11:06.791"	"Applying rule Unsubscribe"
"DEBUG"	5416	"2019-09-27 06:11:06.791"	"Applying rule Spam FWD"
"DEBUG"	5416	"2019-09-27 06:11:06.791"	"Applying rule Spam Delete"
"DEBUG"	5416	"2019-09-27 06:11:06.791"	"Applying rule Block Backscatter"
"DEBUG"	5416	"2019-09-27 06:11:06.791"	"Performing local delivery"
"DEBUG"	5416	"2019-09-27 06:11:06.822"	"Applying rules"
"DEBUG"	5416	"2019-09-27 06:11:06.822"	"Applying rule Chase alerts"
"DEBUG"	5416	"2019-09-27 06:11:06.822"	"Applying rule Dingbat Messages B"
"DEBUG"	5416	"2019-09-27 06:11:06.822"	"Saving message: {AB0741C3-BF85-43A3-984F-FA16F152BBB4}.eml"
"DEBUG"	5416	"2019-09-27 06:11:06.838"	"AWStats::LogDeliverySuccess"
"DEBUG"	5416	"2019-09-27 06:11:06.838"	"Local delivery completed"
"APPLICATION"	5416	"2019-09-27 06:11:06.838"	"SMTPDeliverer - Message 411028: Message delivery thread completed."

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

Re: Help with routes

Post by palinka » 2019-09-27 12:39

Here's the diagnostic:

Code: Select all

2019-09-27   Hmailserver: 5.7.0-B2486

DOMAINS

   "Domain1.com" - 12x.dyxx.com                   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

   "Domain2.com" - djxxxxx.dyxx.com               Enabled: False

   "Domain3.com" - lixxx.dyxx.net                 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: c:\xampp\apache\conf\altcerts\dynu.net\mail._domainkey.Domain3.com.pem
                                                Selector:    mail

   "Domain4.com" - pixxxx.us                      Enabled: True

SIGNATURE         LIMITS                       DKIM               ADVANCED
  Enabled: False   Max size:                0   Enabled: True    
                   Max message size:        0   Header:   Relaxed  Plus addressing:  True
                   Max size of accounts:    0   Body:     Relaxed  Character:           +
                                                Algorithm: SHA256  Greylisting:     False
                                                Private key: c:\xampp\apache\conf\altcerts\Domain4.com\mail.Domain4.com.pem
                                                Selector:    mail

   "Domain5.com" - q-xxx.com                      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

   "Domain6.com" - rgxxxxx.com                    Enabled: True

SIGNATURE         LIMITS                       DKIM               ADVANCED
  Enabled: False   Max size:                0   Enabled: True    
                   Max message size:        0   Header:   Relaxed  Plus addressing:  True
                   Max size of accounts:    0   Body:     Relaxed  Character:           +
                                                Algorithm: SHA256  Greylisting:     False
                                                Private key: c:\xampp\apache\conf\altcerts\Domain6.com\mail.Domain6.com.pem
                                                Selector:    mail

   "Domain7.com" - spxx.dyxx.net                  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

   "Domain8.com" - wax.dyxx.net                   Enabled: True

SIGNATURE         LIMITS                       DKIM               ADVANCED
  Enabled: False   Max size:                0   Enabled: True      Catchall: sms@Domain8.com
                   Max message size:        0   Header:   Relaxed  Plus addressing: False
                   Max size of accounts:    0   Body:     Relaxed
                                                Algorithm: SHA256  Greylisting:     False
                                                Private key: c:\xampp\apache\conf\altcerts\dynu.net\mail._domainkey.Domain8.com.pem
                                                Selector:    mail
-----------------------------------------------------------------------------------------------

GLOBAL RULES
  1, Dingbat Messages             Criteria:  Use AND
     Custom: X-hMailServer-LoopCount   Less Than       1
     Custom: FROM                      Regular Expr    (^.*(haydeewal16|5165955730).*$)
                                  -----Actions-----
             Forward                                   brian@Domain4.com
 ---------------------------------------------------------------------
  2, Unsubscribe                  Criteria:  Use AND
             To                        Regular Expr    ^.*(daniela|mark|zoe|mconstantino).*$
     Custom: X-hMailServer-Reason-Sc   Less Than       8
                                  -----Actions-----
             Set Header Value                          X-hMailServer-Unsubscribe = 1:0
             Run Function                              Unsubscribe
 ---------------------------------------------------------------------
  3, Spam FWD                     Criteria:  Use AND
     Custom: X-hMailServer-Spam        Equals          YES
     Custom: X-hMailServer-LoopCount   Less Than       1
     Custom: X-hMailServer-Reason-Sc   Less Than       6
                                  -----Actions-----
             Forward                                   spam@Domain7.com
 ---------------------------------------------------------------------
  4, Spam Delete                  Criteria:  Use AND
     Custom: X-hMailServer-Spam        Equals          YES
     Custom: X-hMailServer-LoopCount   Less Than       1
     Custom: X-hMailServer-Reason-Sc   Greater Than    5.999
                                  -----Actions-----
             Forward                                   spam@Domain7.com
             Delete
 ---------------------------------------------------------------------
  5, Block Backscatter            Criteria:  Use AND
             From                      Contains        mailer-daemon@Domain8.com
             To                        Regular Expr    ^((?![REDACTED|DOMAIN|LIST]).)*$
                                  -----Actions-----
             Delete
-----------------------------------------------------------------------------------------------

IP RANGES

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

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


------------------------------------------------------
AUTOBANNED Local Addresses:
    No entries

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

AUTOBAN
  Autoban Enabled: True       Max invalid logon attempts:      2
                              Minutes Before Reset:         1440  (24.00 hours, 1.00 days)
                              Minutes to Autoban:          10080  (168.00 hours, 7.00 days)

There is a total of 3 auto-ban IP ranges.
-----------------------------------------------------------------------------------------------

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: Domain8.com         Empty sender:       True  Batch recipients:   100
Max Msg Size: 40960  Relay:-                   Incorrect endings:  True  Use STARTTLS:      True
                      EXTERNAL.TLD  (ok)       Disc. on invalid:   True  Delivered-To hdr: False
                     Port: 587                 Max number commands:   3  Loop limit:           5
                     Req Auth: True *User Entered*                       Recipient hosts:     15
                     Con. Sec.: StartTLS Required
  Routes:
    Domain5.com              - S: Remote  R: Remote - Addr: All         (ok)

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:                  3       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:       False        Use SA score:        True

  Spam delete threshold: 8000         Maximum message size: 1024

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

SURBL ENTRIES:
                   multi.surbl.org      Score: 3
                  dbl.spamhaus.org      Score: 5

GREYLISTING:
  Greylisting:  False

WHITELISTING
              0.0.0.0            to    255.255.255.255              1234567890[@t]tmomail[dot]net
              0.0.0.0            to    255.255.255.255              +11234567890[@t]tmomail[dot]net
              0.0.0.0            to    255.255.255.255              tims[@t]stripersonline[dot]com
-----------------------------------------------------------------------------------------------

ANTIVIRUS

GENERAL:
  When found - Delete Attachments.

  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
   lews-combined
       Certificate: C:\ProgramData\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org\Domain8.com-chain.pem
       Private key: C:\ProgramData\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org\Domain8.com-key.pem
   Domain8.com
       Certificate: C:\xampp\certificates\Domain8.com-chain.pem
       Private key: C:\xampp\certificates\Domain8.com-key.pem
-----------------------------------------------------------------------------------------------

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

HIGH                            - !TLSv1                          - !SSLv3;                         
-----------------------------------------------------------------------------------------------

TCPIP PORTS                                         Connection Sec
               0.0.0.0         / 25    / SMTP   -   StartTLS Optional   Cert: Domain8.com
               0.0.0.0         / 110   / POP3   -   StartTLS Optional   Cert: Domain8.com
               0.0.0.0         / 143   / IMAP   -   StartTLS Optional   Cert: Domain8.com
               0.0.0.0         / 465   / SMTP   -   SSL/TLS             Cert: Domain8.com
               0.0.0.0         / 587   / SMTP   -   StartTLS Optional   Cert: Domain8.com
               0.0.0.0         / 993   / IMAP   -   SSL/TLS             Cert: Domain8.com
               0.0.0.0         / 995   / POP3   -   SSL/TLS             Cert: Domain8.com
-----------------------------------------------------------------------------------------------

LOGGING      Logging Enabled: True

  Paths:-
    Current:  C:\Program Files (x86)\hMailServer\Logs\hmailserver_2019-09-27.log
    Error:    C:\Program Files (x86)\hMailServer\Logs\ERROR_hmailserver_2019-09-27.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        -      .
                        TCPIP       -    True
                        DEBUG       -    True
                        AWSTATS     -    True
-----------------------------------------------------------------------------------------------

SYSTEM TESTS

Database type: MySQL

IPv6 support is available in operating system.

Backup directory X:\HMS-BACKUP is writable.

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

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

HMAILSERVER.INI

[Directories]
Program folder:  C:\Program Files (x86)\hMailServer\
Database folder: 
Data folder:     X:\HMS-DATA\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=          hmailserver
PasswordEncryption=1
Port=              3306
Server=            localhost
Internal=          0

[settings]
DisableAUTHList=25
RewriteEnvelopeFromWhenForwarding=1
-----------------------------------------------------------------------------------------------

Error 438. Out-dated version. Some fields or objects missing.

Generated by HMSSettingsDiagnostics v1.96, Hmailserver Forum.

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

Re: Help with routes

Post by palinka » 2019-09-27 12:43

By the way, I also tested by sending to an external domain (wife's work email) and the message was sent through my paid relay service instead of through gmail. She received the message but it went to spam because it failed SPF.

Edit - also just noticed the diagnostic script doesn't pick up TLS 1.3. Its brand new, anyway. :mrgreen:

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

Re: Help with routes

Post by palinka » 2019-09-27 13:11

And just in case, here is a log transaction from me@example.com to wife's external domain. It was sent through my paid relay and not through gmail.

Code: Select all

"TCPIP"	5552	"2019-09-27 07:01:08.139"	"TCP - 127.0.0.1 connected to 127.0.0.1:587."
"DEBUG"	5552	"2019-09-27 07:01:08.139"	"Executing event OnClientConnect"
"DEBUG"	5552	"2019-09-27 07:01:08.139"	"Event completed"
"DEBUG"	5552	"2019-09-27 07:01:08.139"	"TCP connection started for session 49"
"SMTPD"	5552	49	"2019-09-27 07:01:08.139"	"127.0.0.1"	"SENT: 220 my.helo.banner"
"SMTPD"	5548	49	"2019-09-27 07:01:08.139"	"127.0.0.1"	"RECEIVED: EHLO my.helo.banner"
"DEBUG"	5548	"2019-09-27 07:01:08.139"	"Executing event OnHELO"
"DEBUG"	5548	"2019-09-27 07:01:08.249"	"Event completed"
"SMTPD"	5548	49	"2019-09-27 07:01:08.249"	"127.0.0.1"	"SENT: 250-my.helo.banner[nl]250-SIZE 41943040[nl]250-STARTTLS[nl]250-AUTH LOGIN[nl]250 HELP"
"SMTPD"	5552	49	"2019-09-27 07:01:08.249"	"127.0.0.1"	"RECEIVED: STARTTLS"
"SMTPD"	5552	49	"2019-09-27 07:01:08.249"	"127.0.0.1"	"SENT: 220 Ready to start TLS"
"DEBUG"	5548	"2019-09-27 07:01:08.249"	"Performing SSL/TLS handshake for session 49. Verify certificate: False"
"TCPIP"	5548	"2019-09-27 07:01:08.358"	"TCPConnection - TLS/SSL handshake completed. Session Id: 49, Remote IP: 127.0.0.1, Version: TLSv1.2, Cipher: ECDHE-RSA-AES128-GCM-SHA256, Bits: 128"
"SMTPD"	5544	49	"2019-09-27 07:01:08.358"	"127.0.0.1"	"RECEIVED: EHLO my.helo.banner"
"DEBUG"	5544	"2019-09-27 07:01:08.358"	"Executing event OnHELO"
"DEBUG"	5544	"2019-09-27 07:01:08.483"	"Event completed"
"SMTPD"	5544	49	"2019-09-27 07:01:08.483"	"127.0.0.1"	"SENT: 250-my.helo.banner[nl]250-SIZE 41943040[nl]250-AUTH LOGIN[nl]250 HELP"
"SMTPD"	5548	49	"2019-09-27 07:01:08.483"	"127.0.0.1"	"RECEIVED: AUTH LOGIN"
"SMTPD"	5548	49	"2019-09-27 07:01:08.483"	"127.0.0.1"	"SENT: 334 VXNlcm5hbWU6"
"SMTPD"	5544	49	"2019-09-27 07:01:08.483"	"127.0.0.1"	"RECEIVED: [REDACTED]"
"SMTPD"	5544	49	"2019-09-27 07:01:08.483"	"127.0.0.1"	"SENT: 334 UGFzc3dvcmQ6"
"SMTPD"	5560	49	"2019-09-27 07:01:08.483"	"127.0.0.1"	"RECEIVED: ***"
"DEBUG"	5560	"2019-09-27 07:01:08.483"	"Executing event OnClientLogon"
"DEBUG"	5560	"2019-09-27 07:01:08.624"	"Event completed"
"SMTPD"	5560	49	"2019-09-27 07:01:08.639"	"127.0.0.1"	"SENT: 235 authenticated."
"SMTPD"	5560	49	"2019-09-27 07:01:08.639"	"127.0.0.1"	"RECEIVED: MAIL FROM:<me@example.com>"
"SMTPD"	5560	49	"2019-09-27 07:01:08.639"	"127.0.0.1"	"SENT: 250 OK"
"SMTPD"	5560	49	"2019-09-27 07:01:08.639"	"127.0.0.1"	"RECEIVED: RCPT TO:<wife@externaldomain.com>"
"SMTPD"	5560	49	"2019-09-27 07:01:08.639"	"127.0.0.1"	"SENT: 250 OK"
"SMTPD"	5560	49	"2019-09-27 07:01:08.639"	"127.0.0.1"	"RECEIVED: DATA"
"DEBUG"	5560	"2019-09-27 07:01:08.655"	"Executing event OnSMTPData"
"DEBUG"	5560	"2019-09-27 07:01:08.655"	"Event completed"
"SMTPD"	5560	49	"2019-09-27 07:01:08.671"	"127.0.0.1"	"SENT: 354 OK, send."
"DEBUG"	5552	"2019-09-27 07:01:08.671"	"Could not retrieve PTR record for IP (false)! 127.0.0.1"
"DEBUG"	5552	"2019-09-27 07:01:08.686"	"Adding task AsynchronousTask to work queue Asynchronous task queue"
"DEBUG"	5360	"2019-09-27 07:01:08.686"	"Executing task AsynchronousTask in work queue Asynchronous task queue"
"DEBUG"	5360	"2019-09-27 07:01:08.702"	"Executing event OnAcceptMessage"
"DEBUG"	5360	"2019-09-27 07:01:08.702"	"Event completed"
"DEBUG"	5360	"2019-09-27 07:01:08.702"	"Saving message: {2C889267-56A8-4250-B9C6-F204B5DBEB75}.eml"
"DEBUG"	5360	"2019-09-27 07:01:08.733"	"Requesting SMTPDeliveryManager to start message delivery"
"SMTPD"	5360	49	"2019-09-27 07:01:08.733"	"127.0.0.1"	"SENT: 250 Queued (0.031 seconds)"
"SMTPD"	5544	49	"2019-09-27 07:01:08.733"	"127.0.0.1"	"RECEIVED: QUIT"
"SMTPD"	5544	49	"2019-09-27 07:01:08.733"	"127.0.0.1"	"SENT: 221 goodbye"
"DEBUG"	5508	"2019-09-27 07:01:08.733"	"Ending session 49"
"DEBUG"	5372	"2019-09-27 07:01:08.733"	"Adding task DeliveryTask to work queue SMTP delivery queue"
"DEBUG"	5416	"2019-09-27 07:01:08.733"	"Executing task DeliveryTask in work queue SMTP delivery queue"
"DEBUG"	5416	"2019-09-27 07:01:08.749"	"Delivering message..."
"APPLICATION"	5416	"2019-09-27 07:01:08.749"	"SMTPDeliverer - Message 411031: Delivering message from me@example.com to wife@externaldomain.com. File: X:\HMS-DATA\Data\{2C889267-56A8-4250-B9C6-F204B5DBEB75}.eml"
"DEBUG"	5416	"2019-09-27 07:01:08.749"	"Connecting to ClamAV virus scanner..."
"DEBUG"	5416	"2019-09-27 07:01:08.749"	"Connecting to ClamAV stream port..."
"DEBUG"	5544	"2019-09-27 07:01:08.764"	"Saving message: {6A5B0DB4-7BDA-47A2-A74E-C75D3D2AA2AB}.eml"
"DEBUG"	5548	"2019-09-27 07:01:08.905"	"Ending session 262"
"DEBUG"	5416	"2019-09-27 07:01:09.839"	"No virus detected: stream: OK"
"DEBUG"	5416	"2019-09-27 07:01:09.839"	"Applying rules"
"DEBUG"	5416	"2019-09-27 07:01:09.839"	"Applying rule Dingbat Messages"
"DEBUG"	5416	"2019-09-27 07:01:09.839"	"Applying rule Unsubscribe"
"DEBUG"	5416	"2019-09-27 07:01:09.839"	"Applying rule Spam FWD"
"DEBUG"	5416	"2019-09-27 07:01:09.839"	"Applying rule Spam Delete"
"DEBUG"	5416	"2019-09-27 07:01:09.839"	"Applying rule Block Backscatter"
"DEBUG"	5416	"2019-09-27 07:01:09.854"	"Performing local delivery"
"DEBUG"	5416	"2019-09-27 07:01:09.854"	"Local delivery completed"
"APPLICATION"	5416	"2019-09-27 07:01:09.870"	"SMTPDeliverer - Message 411031: Relaying to host mail.smtp2go.com."
"DEBUG"	5416	"2019-09-27 07:01:09.870"	"Starting external delivery process. Server: mail.smtp2go.com (45.79.71.155), Port: 587, Security: 3, User name: brian@pinneo.us"
"DEBUG"	5416	"2019-09-27 07:01:09.870"	"Pre-creating session 266"
"TCPIP"	5416	"2019-09-27 07:01:09.870"	"Connecting to 45.79.71.155:587..."
"DEBUG"	5552	"2019-09-27 07:01:09.948"	"TCP connection started for session 266"
"SMTPC"	5552	266	"2019-09-27 07:01:10.011"	"45.79.71.155"	"RECEIVED: 220 mail.smtp2go.com ESMTP Exim 4.92-S2G Fri, 27 Sep 2019 11:01:12 +0000"
"SMTPC"	5552	266	"2019-09-27 07:01:10.011"	"45.79.71.155"	"SENT: EHLO my.helo.banner"
"DEBUG"	5512	"2019-09-27 07:01:10.089"	"Pre-creating session 267"
"TCPIP"	5512	"2019-09-27 07:01:10.089"	"TCP - 127.0.0.1 connected to 127.0.0.1:143."
"DEBUG"	5512	"2019-09-27 07:01:10.089"	"Executing event OnClientConnect"
"DEBUG"	5512	"2019-09-27 07:01:10.089"	"Event completed"
"DEBUG"	5512	"2019-09-27 07:01:10.089"	"TCP connection started for session 264"
"DEBUG"	5512	"2019-09-27 07:01:10.089"	"Performing SSL/TLS handshake for session 264. Verify certificate: False"
"SMTPC"	5560	266	"2019-09-27 07:01:10.104"	"45.79.71.155"	"RECEIVED: 250-mail.smtp2go.com Hello my.helo.banner [my.ip.add.ress][nl]250-SIZE 52428800[nl]250-8BITMIME[nl]250-PIPELINING[nl]250-AUTH CRAM-MD5 PLAIN LOGIN[nl]250-CHUNKING[nl]250-STARTTLS[nl]250-PRDR[nl]250 HELP"
"SMTPC"	5560	266	"2019-09-27 07:01:10.104"	"45.79.71.155"	"SENT: STARTTLS"
"TCPIP"	5552	"2019-09-27 07:01:10.167"	"TCPConnection - TLS/SSL handshake completed. Session Id: 264, Remote IP: 127.0.0.1, Version: TLSv1.2, Cipher: ECDHE-RSA-AES128-GCM-SHA256, Bits: 128"
"DEBUG"	5552	"2019-09-27 07:01:10.167"	"Executing event OnClientLogon"
"SMTPC"	5560	266	"2019-09-27 07:01:10.198"	"45.79.71.155"	"RECEIVED: 220 TLS go ahead"
"DEBUG"	5560	"2019-09-27 07:01:10.198"	"Performing SSL/TLS handshake for session 266. Verify certificate: True, Expected remote host name: mail.smtp2go.com"
"DEBUG"	5552	"2019-09-27 07:01:10.245"	"Event completed"
"DEBUG"	5552	"2019-09-27 07:01:10.276"	"Ending session 264"
"DEBUG"	5552	"2019-09-27 07:01:10.386"	"Certificate verification succeeded for session 266."
"TCPIP"	5560	"2019-09-27 07:01:10.464"	"TCPConnection - TLS/SSL handshake completed. Session Id: 266, Remote IP: 45.79.71.155, Version: TLSv1.2, Cipher: ECDHE-RSA-AES256-GCM-SHA384, Bits: 256"
"SMTPC"	5560	266	"2019-09-27 07:01:10.464"	"45.79.71.155"	"SENT: EHLO my.helo.banner"
"SMTPC"	5560	266	"2019-09-27 07:01:10.542"	"45.79.71.155"	"RECEIVED: 250-mail.smtp2go.com Hello my.helo.banner [my.ip.add.ress][nl]250-SIZE 52428800[nl]250-8BITMIME[nl]250-PIPELINING[nl]250-AUTH CRAM-MD5 PLAIN LOGIN[nl]250-CHUNKING[nl]250-PRDR[nl]250 HELP"
"SMTPC"	5560	266	"2019-09-27 07:01:10.542"	"45.79.71.155"	"SENT: AUTH LOGIN"
"SMTPC"	5548	266	"2019-09-27 07:01:10.604"	"45.79.71.155"	"RECEIVED: 334 VXNlcm5hbWU6"
"SMTPC"	5548	266	"2019-09-27 07:01:10.604"	"45.79.71.155"	"SENT: [REDACTED]"
"SMTPC"	5560	266	"2019-09-27 07:01:10.683"	"45.79.71.155"	"RECEIVED: 334 UGFzc3dvcmQ6"
"SMTPC"	5560	266	"2019-09-27 07:01:10.683"	"45.79.71.155"	"SENT: ***"
"SMTPC"	5544	266	"2019-09-27 07:01:10.761"	"45.79.71.155"	"RECEIVED: 235 Authentication succeeded"
"SMTPC"	5544	266	"2019-09-27 07:01:10.761"	"45.79.71.155"	"SENT: ***"
"SMTPC"	5548	266	"2019-09-27 07:01:10.839"	"45.79.71.155"	"RECEIVED: 250 OK"
"SMTPC"	5548	266	"2019-09-27 07:01:10.839"	"45.79.71.155"	"SENT: RCPT TO:<wife@externaldomain.com>"
"SMTPC"	5560	266	"2019-09-27 07:01:11.183"	"45.79.71.155"	"RECEIVED: 250 Accepted <wife@externaldomain.com>"
"SMTPC"	5560	266	"2019-09-27 07:01:11.198"	"45.79.71.155"	"SENT: DATA"
"SMTPC"	5544	266	"2019-09-27 07:01:11.261"	"45.79.71.155"	"RECEIVED: 354 Enter message, ending with "." on a line by itself"
"SMTPC"	5544	266	"2019-09-27 07:01:11.261"	"45.79.71.155"	"SENT: [nl]."
"SMTPC"	5548	266	"2019-09-27 07:01:11.417"	"45.79.71.155"	"RECEIVED: 250 OK id=1iDnzt-DuuaAq-J8"
"SMTPC"	5548	266	"2019-09-27 07:01:11.417"	"45.79.71.155"	"SENT: QUIT"
"SMTPC"	5544	266	"2019-09-27 07:01:11.495"	"45.79.71.155"	"RECEIVED: 221 mail.smtp2go.com closing connection"
"DEBUG"	5544	"2019-09-27 07:01:11.495"	"Ending session 266"
"DEBUG"	5416	"2019-09-27 07:01:11.495"	"External delivery process completed"
"DEBUG"	5416	"2019-09-27 07:01:11.495"	"Summarizing delivery result"
"DEBUG"	5416	"2019-09-27 07:01:11.495"	"AWStats::LogDeliverySuccess"
"DEBUG"	5416	"2019-09-27 07:01:11.495"	"Summarized delivery results"
"DEBUG"	5416	"2019-09-27 07:01:11.495"	"Deleting message"
"DEBUG"	5416	"2019-09-27 07:01:11.511"	"Deleting message file."
"APPLICATION"	5416	"2019-09-27 07:01:11.511"	"SMTPDeliverer - Message 411031: Message delivery thread completed."

User avatar
jim.bus
Senior user
Senior user
Posts: 304
Joined: 2011-05-28 11:49
Location: US

Re: Help with routes

Post by jim.bus » 2019-09-27 13:34

All,

By the way, there appears to be something about palinka's Topic set up on the Forum which causes the Email Notification to set up an unsecured link to his 'Help with routes' Topic. The links generated on the Email Notification are all http:// links not https:// links which make the connection to his Forum Topic unsecured.

On other topics, i will get https:// links and these are secured but I have gotten the http:// links on other Topic Notification emails but most are https:// links.

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

Re: Help with routes

Post by jimimaseye » 2019-09-27 14:22

palinka wrote:
2019-09-27 12:43
Edit - also just noticed the diagnostic script doesn't pick up TLS 1.3. Its brand new, anyway. :mrgreen:
Yep. Will look at the script in due course when the new version becomes more mainstream (unless someone has time to highlight the changes in the script required)

[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

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

Re: Help with routes

Post by palinka » 2019-09-27 15:38

mattg wrote:
2019-09-27 01:06
As a test, I set a route for gmail.com using my gmail account credentials on port 465

I can clearly see that delivery is done on port 465, using my credentials to AUTH on the gmail server

In addition to the diagnostics, show some logs please

My logs include this
"APPLICATION" 7776 "2019-09-27 09:01:57.657" "SMTPDeliverer - Message 1231379: Relaying to host smtp.gmail.com."
"DEBUG" 7776 "2019-09-27 09:01:57.657" "Starting external delivery process. Server: smtp.gmail.com (74.125.24.108), Port: 465, Security: 1, User name: mattg#####@gmail.com"
You're on 5.7.0, correct? If yes, then i can rule this out as a bug and it would necessarily be a configuration error.


_190927_093534_677.png

User avatar
katip
Senior user
Senior user
Posts: 701
Joined: 2006-12-22 07:58
Location: Istanbul

Re: Help with routes

Post by katip » 2019-09-27 16:19

if i'm not mistaking, routes are triggered by recipients, not senders.
you can't simply put your local domain in General tab of route settings and expect everything you send external will be relayed via gmail. you should put that particular external.com there (in next 2 tabs there are other useful options).
Katip
--
HMS 5.7.0-B2428-LTS-64-bit, MySQL 5.7.24, SA 3.4.2, ClamAV 0.101.2 + SaneS

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

Re: Help with routes

Post by palinka » 2019-09-27 16:44

katip wrote:
2019-09-27 16:19
if i'm not mistaking, routes are triggered by recipients, not senders.
you can't simply put your local domain in General tab of route settings and expect everything you send external will be relayed via gmail. you should put that particular external.com there (in next 2 tabs there are other useful options).
I thought it was both sender and recipient.

If sender domain matches route, you have the option of delivering locally or via route.

If recipient domain matches route, you have the option of delivering locally or via route.

I have both options set to remote, so whether i send from me@example.com or send to another valid user on example.com (mailbox located at gmail) then it should go through the route, not locally and not through my paid relay.

As to the other tabs, "addresses" restricts delivery to ones on the list (i have none = deliver to all) and "delivery" is just credentials for the route delivery. I haven't even got far enough to test the credentials because no deliveries have been sent by the route.

I just went through my scripts looking for anything that might be preventing route delivery and couldn't find anything. I'm totally stumped.

User avatar
katip
Senior user
Senior user
Posts: 701
Joined: 2006-12-22 07:58
Location: Istanbul

Re: Help with routes

Post by katip » 2019-09-27 16:59

ok, let's try this:
Domain : wife's job adress' domain (job.com), must be external
Target smtp : gmail...
When... : both "a remote address"

Addresses Tab : all
Delivery tab : gmail credentials etc..

(BTW, not to mention that gmail free accounts require sender's gmail address as From.)
Katip
--
HMS 5.7.0-B2428-LTS-64-bit, MySQL 5.7.24, SA 3.4.2, ClamAV 0.101.2 + SaneS

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

Re: Help with routes

Post by palinka » 2019-09-27 17:00

I disabled example.com and then sent a message from local account to example account (which is hosted on gmail). This ended in failure. The route is being totally ignored. I'm leaning more and more toward bug and not configuration error.

Code: Select all

"SMTPD"	5552	1091	"2019-09-27 10:55:57.091"	"127.0.0.1"	"SENT: 250 OK"
"SMTPD"	5560	1091	"2019-09-27 10:55:57.091"	"127.0.0.1"	"RECEIVED: RCPT TO:<me@example.com>"
"DEBUG"	5560	"2019-09-27 10:55:57.091"	"AWStats::LogDeliveryFailure"
"SMTPD"	5560	1091	"2019-09-27 10:55:57.091"	"127.0.0.1"	"SENT: 550 Domain has been disabled."
"SMTPD"	5520	1091	"2019-09-27 10:55:57.184"	"127.0.0.1"	"RECEIVED: RSET"
"DEBUG"	5520	"2019-09-27 10:55:57.184"	"Deleting message file."
"SMTPD"	5520	1091	"2019-09-27 10:55:57.184"	"127.0.0.1"	"SENT: 250 OK"
"DEBUG"	5552	"2019-09-27 10:55:57.231"	"Ending session 1259"
"SMTPD"	5560	1091	"2019-09-27 10:55:57.231"	"127.0.0.1"	"RECEIVED: QUIT"
"SMTPD"	5560	1091	"2019-09-27 10:55:57.231"	"127.0.0.1"	"SENT: 221 goodbye"
"DEBUG"	5552	"2019-09-27 10:55:57.231"	"Ending session 1091"

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

Re: Help with routes

Post by palinka » 2019-09-27 17:09

katip wrote:
2019-09-27 16:59
ok, let's try this:
Domain : wife's job adress' domain (job.com), must be external
Target smtp : gmail...
When... : both "a remote address"

Addresses Tab : all
Delivery tab : gmail credentials etc..

(BTW, not to mention that gmail free accounts require sender's gmail address as From.)
This worked! Message delivered via gmail! Now how do I configure to get what I want it to do? Obviously, I can't predict every recipient domain. :(

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

Re: Help with routes

Post by palinka » 2019-09-27 17:35

mattg wrote:
2019-09-27 01:06
As a test, I set a route for gmail.com using my gmail account credentials on port 465
Would you please try the same but using a local domain?

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

Re: Help with routes

Post by palinka » 2019-09-27 18:12

Also, I confirmed that message sent from me@example.com do get routed via gmail when recipient is otheruser@example.com.

But I need all messages from me@example.com to be routed through gmail. Can this be scripted?

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

Re: Help with routes

Post by palinka » 2019-09-27 18:52

This is driving my OCD batty...

New idea:

Changed domain from example.com to example.tld (literally, changed .com to .tld).

Retained example.com route the way it is above.

Added this script to transform the from address:

Code: Select all

Sub OnDeliveryStart(oMessage)
	Dim strRegEx
	strRegEx = "me@example.tld"
	If Lookup(strRegEx, oMessage.From) Then
		oMessage.From = Chr(34) & "My Name" & Chr(34) & " <me@example.com>"
		oMessage.FromAddress = "me@example.com"
		oMessage.Save
	End If
End Sub
The script works, but the route still doesn't get picked up. The message was sent via my paid relay and received by external as "me@example.com".

I guess routes are ONLY for recipients and never for senders?

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

Re: Help with routes

Post by palinka » 2019-09-27 19:50

OK, I think I finally cracked it:

Global Rule:
IF from contains me@example.com
THEN send via route example.com

This seems to work. It still delivers locally to local domains. That's not a big deal as long as the rest goes through gmail.

I can't believe it was that simple. I was looking for this by account rule. "Send via route" is not an option on account rule actions. Duh... didn't even think to look at global rules. Oh well, OCD wins again....

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

Re: Help with routes

Post by mattg » 2019-09-28 04:10

palinka wrote:
2019-09-27 15:38
You're on 5.7.0, correct?
Yes
palinka wrote:
2019-09-27 17:35
mattg wrote:
2019-09-27 01:06
As a test, I set a route for gmail.com using my gmail account credentials on port 465
Would you please try the same but using a local domain?
This domain (lets say example.com) I have partially hosted on my server, and I sent a message from my main domain to an example.com recipient NOT on my server, but on the externally hosted server for example.com.

I have a route set for example.com that points to mx.hosting.com

Code: Select all

"APPLICATION"	7776	"2019-09-27 07:15:58.125"	"SMTPDeliverer - Message 1231359: Relaying to host mx.hosting.com."
"DEBUG"	7776	"2019-09-27 07:15:58.125"	"Starting external delivery process. Server: mx.hosting.com (123.123.XXX.123), Port: 25, Security: 2, User name: "
"DEBUG"	7776	"2019-09-27 07:15:58.125"	"Pre-creating session 2465"
"TCPIP"	7776	"2019-09-27 07:15:58.125"	"Connecting to 123.123.XXX.123:25..."
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

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

Re: Help with routes

Post by mattg » 2019-09-28 04:17

palinka wrote:
2019-09-27 12:29
Sending mail via webmail from me@example.com to a different domain local account. This *should* get relayed through gmail and sent back to me. I have remote/remote checked for "sender/recipient matches".
ALWAYS

If the recipient account occurs locally, the mail will be delivered locally
This will ONLY get sent via the route if the domain exists locally, but the ACCOUNT does NOT


You should have Sender = remote, recipient = local in the route settings
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

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

Re: Help with routes

Post by mattg » 2019-09-28 05:00

jimimaseye wrote:
2019-09-27 14:22
palinka wrote:
2019-09-27 12:43
Edit - also just noticed the diagnostic script doesn't pick up TLS 1.3. Its brand new, anyway. :mrgreen:
Yep. Will look at the script in due course when the new version becomes more mainstream (unless someone has time to highlight the changes in the script required)

[Entered by mobile. Excuse my spelling.]
done in that script thread
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: 1276
Joined: 2017-09-12 17:57

Re: Help with routes

Post by palinka » 2019-09-28 11:20

Whew lads! Its working now but outlook just does not like mammoth sized mailboxes. I don't even know how big this mailbox is (haven't looked) but it's 45k messages over 8 years with lots of attachments. 30k in the inbox alone. I'm going to have to archive some of this. EmClient works nicely with the big mailbox, by the way.

User avatar
jim.bus
Senior user
Senior user
Posts: 304
Joined: 2011-05-28 11:49
Location: US

Re: Help with routes

Post by jim.bus » 2019-09-28 12:34

palinka wrote:
2019-09-28 11:20
Whew lads! Its working now but outlook just does not like mammoth sized mailboxes. I don't even know how big this mailbox is (haven't looked) but it's 45k messages over 8 years with lots of attachments. 30k in the inbox alone. I'm going to have to archive some of this. EmClient works nicely with the big mailbox, by the way.
I use Outlook 2010 and I have 27,861 messages in my Archive Inbox and I don't seem to have any problem inside Outlook in accessing them. The entire Archive .PST file is 5,325,817 KB. I don't go into my Archive file much but no problems I know of. And my Archive .PST file is not moved outside of Outlook. It is an open .PST file in Outlook Data Files.

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

Re: Help with routes

Post by palinka » 2019-09-28 12:49

jim.bus wrote:
2019-09-28 12:34
palinka wrote:
2019-09-28 11:20
Whew lads! Its working now but outlook just does not like mammoth sized mailboxes. I don't even know how big this mailbox is (haven't looked) but it's 45k messages over 8 years with lots of attachments. 30k in the inbox alone. I'm going to have to archive some of this. EmClient works nicely with the big mailbox, by the way.
I use Outlook 2010 and I have 27,861 messages in my Archive Inbox and I don't seem to have any problem inside Outlook in accessing them. The entire Archive .PST file is 5,325,817 KB. I don't go into my Archive file much but no problems I know of. And my Archive .PST file is not moved outside of Outlook. It is an open .PST file in Outlook Data Files.
I think if i started small and grew it wouldn't be an issue. This is the first time I've had an issue with outlook, but it's a game changing one.

User avatar
jim.bus
Senior user
Senior user
Posts: 304
Joined: 2011-05-28 11:49
Location: US

Re: Help with routes

Post by jim.bus » 2019-09-28 22:39

palinka wrote:
2019-09-28 12:49
jim.bus wrote:
2019-09-28 12:34
palinka wrote:
2019-09-28 11:20
Whew lads! Its working now but outlook just does not like mammoth sized mailboxes. I don't even know how big this mailbox is (haven't looked) but it's 45k messages over 8 years with lots of attachments. 30k in the inbox alone. I'm going to have to archive some of this. EmClient works nicely with the big mailbox, by the way.
I use Outlook 2010 and I have 27,861 messages in my Archive Inbox and I don't seem to have any problem inside Outlook in accessing them. The entire Archive .PST file is 5,325,817 KB. I don't go into my Archive file much but no problems I know of. And my Archive .PST file is not moved outside of Outlook. It is an open .PST file in Outlook Data Files.
I think if i started small and grew it wouldn't be an issue. This is the first time I've had an issue with outlook, but it's a game changing one.
I've had to reinstall Outlook such as when I did clean Windows installs. I would then Add my Archive File which maybe not the size it is now was because the Archive File is constantly being added to but I added the Full Archive File to Outlook and again no problem. By adding the Archive file I mean I took the whole Archive file and added it to the Outlook setup after Outlook was installed. Meaning at this point to Outlook this was a completely new Archive file I was adding to it. For that matter I could have made it the Active .PST file that receives email downloaded from the server for Outlook would have known. Haven't really tried this but it should work.

Don't know if this might be a problem but did you try to Compact the .PST file. I seem to remember a long time ago once having issues when the Outlook file was not compacted. Something about when Outlook changed to a newer version it wasn't compatible with the old Outlook .PST file format.

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

Re: Help with routes

Post by palinka » 2019-09-28 23:42

Meh... It gave me an excuse to buy emclient, which i like very much. They have a fully functioning 30 trial or a free license that limits you to 2 accounts or something like that. It's really good. It behaves well and is mostly intuitive. I like it. The only thing is, I'm back on imap/caldav/cardav instead of activesync. Not the end of the world since I'm the admin. :mrgreen:

Post Reply