Error Msg when Routing treated as external users

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
Yank
New user
New user
Posts: 6
Joined: 2017-11-19 13:08

Error Msg when Routing treated as external users

Post by Yank » 2018-01-08 01:06

Hi,
Please help me with the folowing problem, i serched the forum but found no answer...

Server and Setup Info:
* I have a Hmailserver Ver: 5.6.4-B2283 installed as a mail server that contains my domain, with some of my client's domaims.
* Asume that my domain is: "yank.com"
* Also asume that the Client's domain is: "client.com"
* "client.com" is a domain originally hosted on an external server and It's also on my server as well (next to my domain).
but on my server there is only one account in "client.com" domain: "reports@client.com".
This account DOSE NOT exist on the external server - only on my server... for sending automated reports on behalf of my client.
* On the SMTP i setup a ROUTE for the client's domain "client.com" to the external (main) server, and selected the options:
- When sender matches route: Treat sender as a remote user.
- When recipient matches route: Treat recipient as a remote user.

The Problem:
All of "client.com" accounts (existing and sending via the external server) can not reach my accounts!
When ever an email is beeing sent from "***@client.com" to "***@yank.com", the sender recives the folowing error message:

"530 SMTP authentication is required."

Who can i solve this? :(

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

Re: Error Msg when Routing treated as external users

Post by mattg » 2018-01-08 03:04

Are you certain that in the route 'when sender matches domain treat as = remote user' is correct??

if so then you have mis-configured your IP ranges...
Run this and post 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

Yank
New user
New user
Posts: 6
Joined: 2017-11-19 13:08

Re: Error Msg when Routing treated as external users

Post by Yank » 2018-01-10 09:22

Hi mattg,

Firstly, thank you for replying :-)

* As for the script you suggested, thank you for that - i'll run it as soon as i finish backing up my machine... (i have to be careful).

* As for your question wether i'm sure if the setup of the "when sender matches domain treat as = remote use" option is currect:
Well, I did that according to Hmailserver online guide about routing.
Here is the link to the online guide - I followed Example Number 2, as i believe that it is the answer to the case at hand. Was i wrong about it???
https://www.hmailserver.com/documentati ... ence_route

* About the IP Ranges... How could it be the issue? after checking it again, i can tell you that this is a public mail server, so no IP limitation were defined in the first place.

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

Re: Error Msg when Routing treated as external users

Post by jimimaseye » 2018-01-10 09:26

mattg wrote: if so then you have mis-configured your IP ranges...
Run this and post the results please >> viewtopic.php?f=20&t=30914
also, FYI, please use the latest version of the documentation as it may have more/further information (...or may not): https://www.hmailserver.com/documentati ... ence_route
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: 19811
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Error Msg when Routing treated as external users

Post by mattg » 2018-01-10 09:57

I wasn't questioning your logic about the choice of switch for 'when sender matches domain treat as = remote user'

I was questioning that you set that switch.

It is the correct switch, and setting it should solve your issue. Hence I surprised that you say it is set, and your logs show otherwise.

The diagnostic script just gets settings from your database, it doesn't change or set anything, but by all meas do a backup first
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Yank
New user
New user
Posts: 6
Joined: 2017-11-19 13:08

Re: Error Msg when Routing treated as external users

Post by Yank » 2018-01-10 17:24

Hi guys. 8)
As requested Here are the test resaults....


I truly hope you can help me - i'm desperd... :(


[code]2018-01-10 Hmailserver: 5.6.4-B2283

DOMAINS

"Domain1.com" - anxxx.co.il 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: True
Private key: c:\hmailserver\dkim signatures\yd_dikimuntil092021.pem
Selector: Domain1.com

"Domain2.com" - atxxxx.co.il 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

"Domain3.com" - k-xxxxxx.com Enabled: False

"Domain4.com" - maxxxxxx.co.il 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: True
Private key: c:\hmailserver\dkim signatures\matachdkimuntil092021.pem
Selector: Domain4.com

"Domain5.com" - moxxxxxxxxxx.com 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: SHA1 Greylisting: False
Private key: c:\hmailserver\dkim signatures\mlcxx.pem
Selector: Domain5.com

"Domain6.com" - myxxxx.co.il 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:\hmailserver\dkim signatures\mysodikim.pem
Selector: mysoft

"Domain7.com" - spxxxxxxxx.co.il 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" - syx.co.il 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

"Domain9.com" - taxxxxx.co.il 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

"Domain10.com" - zixxxx.com 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:\hmailserver\dkim signatures\zivkitdikimuntil092021.pem
Selector: Domain10.com
-----------------------------------------------------------------------------------------------

IP RANGES

IP: 0.0.0.0 - 255.255.255.255 Priority: 10 Name: Internet

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

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


!! Warning: DEFAULT DOMAIN is SET !! - "EXTERNAL.TLD"
------------------------------------------------------
AUTOBANNED Local Addresses:
No entries

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

AUTOBAN
Autoban Enabled: False

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

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

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

PROTOCOLS

SMTP
GENERAL DELIVERY RFC COMPLIANCE ADVANCED
No. Connections:300 No Retries: 2 Mins: 5 Plain Text: False Bind:
Host: EXTERNAL.TLD Empty sender: False Batch recipients: 100
Max Msg Size: 55000 Relay:- Incorrect endings: True Use STARTTLS: True
(none entered) Disc. on invalid: True Delivered-To hdr: False
Max number commands: 2 Loop limit: 2
Recipient hosts: 15
Routes:
Domain2.com - Addresses: All (ok)

POP3
No. Connections: 0

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

ANTISPAM

GENERAL SPAM TESTS Score SPAMASSASSIN
Spam Mark: 5 Use SPF: True - 3 Use Spamassassin: False
Add X-HmailServer-Spam: False Check HELO host: True - 3
Add X-HmailServer-Reason: False Check MX records: True - 3
Add X-HmailServer-Subject: True Verify DKIM: False
Subject Text: "[SPAM]"
Spam delete threshold: 6 Maximum message size: 2048

DNSBL ENTRIES:
No 'enabled' entries

SURBL ENTRIES:
No 'enabled' entries

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

Greylist WHITELIST ENTRIES:
No entries

Greylist DOMAINS enabled:
Domain1.com
Domain4.com

WHITELISTING
0.0.0.0 to 255.255.255.255 *[@t]goXXX[dot]com
0.0.0.0 to 255.255.255.255 *[@t]insXXX[dot]com
0.0.0.0 to 255.255.255.255 *[@t]raXXX[dot]com
-----------------------------------------------------------------------------------------------

ANTIVIRUS: No application configured.

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

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

SSL/TLS
SSL 3.0 : True
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
10.0.0.1 / 25 / SMTP - None
10.0.0.1 / 110 / POP3 - None
10.0.0.1 / 143 / IMAP - SSL/TLS !! NO CERTIFICATE SET !!
-----------------------------------------------------------------------------------------------

LOGGING Logging Enabled: True

Paths:-
Current: E:\HmailServerLogFiles\hmailserver_2018-01-10.log
Error: E:\HmailServerLogFiles\ERROR_hmailserver_2018-01-10.log
Event: E:\HmailServerLogFiles\hmailserver_events.log - Last Event: 2018/01/10
Awstats: E:\HmailServerLogFiles\hmailserver_awstats.log
APPLICATION - True
SMTP - True
POP3 - True
IMAP - .
TCPIP - .
DEBUG - True
AWSTATS - .
-----------------------------------------------------------------------------------------------

SYSTEM TESTS

Database type: MSSQL Compact

IPv6 support is available in operating system.

Backup directory E:\HMail Server Settings and Domains Backups is writable.

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

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

HMAILSERVER.INI

[Directories]
Program folder: C:\hMailServer\
Database folder: C:\hMailServer\Database
Data folder: C:\hMailServer\Data
Log folder: E:\HmailServerLogFiles
Temp folder: C:\hMailServer\Temp
Event folder: C:\hMailServer\Events

[Database]
Type= MSSQLCE
Username=
PasswordEncryption=1
Port= 0
Server=
Internal= 1
-----------------------------------------------------------------------------------------------

[/code]
Generated by HMSSettingsDiagnostics v1.88, Hmailserver Forum.

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

Re: Error Msg when Routing treated as external users

Post by mattg » 2018-01-10 23:51

!! Warning: DEFAULT DOMAIN is SET !! - "EXTERNAL.TLD"
You should remove the default domain if you can - I don't know that it causes your issues, but it is good practice to NOT have a default domain.
Clients need to log on with username in form 'account@example.com' rather than just 'account', but it also attracts a lot of spam. If the other server is misconfigured, this could the reason why mail from that domain fails

You should also look at a real database. MS SQL CE is a toy at best, and as you have 10 domains, you should really consider a real database.

Also, can you show a screenshot of your Route. That report didn't give enough detail about your route...
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
jimimaseye
Moderator
Moderator
Posts: 7957
Joined: 2011-09-08 17:48

Re: Error Msg when Routing treated as external users

Post by jimimaseye » 2018-01-11 00:58

This isn't ideal or normal either:

Code: Select all

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

TCPIP PORTS                                         Connection Sec
               10.0.0.1        / 25    / SMTP   -   None                
               10.0.0.1        / 110   / POP3   -   None                
               10.0.0.1        / 143   / IMAP   -   SSL/TLS             !! NO CERTIFICATE SET !!
-----------------------------------------------------------------------------------------------
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: 19811
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Error Msg when Routing treated as external users

Post by mattg » 2018-01-11 02:12

Yes, but IMAP is disabled
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
jimimaseye
Moderator
Moderator
Posts: 7957
Joined: 2011-09-08 17:48

Re: Error Msg when Routing treated as external users

Post by jimimaseye » 2018-01-11 09:36

Indeed, however, it does show contradiction or confusion in the setup.

I was actually pointing to the ip addresses. I know its not unknown to have a single device in front of the machine doing the routing but this is unusual.

And also, as you have already noted, he has a DEFAULT DOMAIN set to a non-hosted domain.
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

Yank
New user
New user
Posts: 6
Joined: 2017-11-19 13:08

Re: Error Msg when Routing treated as external users

Post by Yank » 2018-01-11 18:00

Hi guys,

Mattg, as you suggested, i erased the default domain name, and attached a screen shot from my routing page on the server.
about a better SQL server - thank you for the tip, that will be my next issue on a difarent post. :D

Jimim, about the SSL Certificate - When i installed the server (at that time) I decided that all connection to my server will be unencrypted.
Today I'll reconsider the SSL.

Back to the matter at hand..., I'd like to remind that the problem is that:
An existing domain on my server is preventing my domain ("yank.com") from receiving emails from a client's account ("*@client.com"), because the client's real mail server is hosted elsewhere,
and his domain on my server was installed just to allow a single account to work on his behalf ("client.com").

Having said that, I attached the email response that was sent back to the sender, on our last test. On that test - the client's account tried to send me an email
and got back the following (attached) response!
To my surprise, i noticed that the response was probably issued by the client's main server and not my server (as i assumed).
If my understanding is correct, than i'm more confused now!
That means that the route is actually working fine but some how the client's main server
thinks that i'm (yank@yank.com) his account. Or that the the email is addressed to him...
And all of the above contradicts the fact that my error log shows the same error message. W.T.F :shock: :?:

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

Re: Error Msg when Routing treated as external users

Post by jimimaseye » 2018-01-11 19:30

Screenshots?
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

Yank
New user
New user
Posts: 6
Joined: 2017-11-19 13:08

Re: Error Msg when Routing treated as external users

Post by Yank » 2018-01-12 11:16

ohh, sorry about that, apparently the pics were not loaded for some reason...

1. http://sye.co.il/tmp/my_error_log.jpg
2. http://sye.co.il/tmp/routecapture1.jpg
3. http://sye.co.il/tmp/where_is_it.jpg

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

Re: Error Msg when Routing treated as external users

Post by jimimaseye » 2018-01-12 11:58

With everything blanked out we cannot tell whether things are right or wrong (effectively it just shows 'something' has happened but without the important detail). We need ip addresses and domain names otherwise we cant check whether the setup is correct or not.
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

Yank
New user
New user
Posts: 6
Joined: 2017-11-19 13:08

Re: Error Msg when Routing treated as external users

Post by Yank » 2018-01-14 12:32

Hi Jimim,

I'm sorry about that.
Unfortunately This is a real system and my hands are tied (confidencialy).

I have an idea: i'll take the original images, and instaed of blacking them out, i'll switch the details with false ones,
WHILE KEEPING ITs ORDER CORRECTLY, that way you could do your checking and i'll have the privacy i need.

Is that OK?

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

Re: Error Msg when Routing treated as external users

Post by jimimaseye » 2018-01-14 12:47

Not really. Dns record checking (for example) a false domain or ip reputation of an invented ip address is pointless. (You may block usernames because they are not important)

If your paranoia is so strong then you may PM the unedited details. And please use text copying of logs (not screen shots).
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

Post Reply