Problem in Send mail to Same Domain account

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
ankur2ankur
New user
New user
Posts: 11
Joined: 2022-09-22 14:28

Problem in Send mail to Same Domain account

Post by ankur2ankur » 2022-09-22 15:38

Hi everyone, I have tried hMailServer for send smtp mail, it works great and i am loving it.

But I am facing a problem.

I am using hmailserver only for sending (outgoing) email through third party app. For Incoming mail I am using google workspace. (MX records are pointed to google)
Now the problem is I cant send mail to user which is not created in hmailsever.

Problem-1:
suppose my domain is "mydomain.com" and I have 3 Account of user1@mydomain.com, user2@mydomain.com, user3@mydomain.com in google workspace.
I have created only only 2 account user1@mydomain.com, user2@mydomain.com in hmailserver.

Now I am unable to send mail form user1@mydomain.com (from hmailserver) to user3@mydomain.com (in google workspace). It says User not exist. (in hmailserver)

Problem-2:
And one more thing when I send mail from user1@mydomain.com to user2@mydomain.com, it send to hmailserver account, but not to google account. I want to receive it in google workspace.

Is there any workaround/solution for this.
Thanks in advance.

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

Re: Problem in Send mail to Same Domain account

Post by jimimaseye » 2022-09-22 16:42

Problem 1:

Create a route

Problem 2:
You cannot do what you want - Hmailserver will ALWAYS deliver to the account if it exists locally. (When it doesnt exist then the route (problem 1) will take over).

https://www.hmailserver.com/documentati ... ence_route
5.7 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

ankur2ankur
New user
New user
Posts: 11
Joined: 2022-09-22 14:28

Re: Problem in Send mail to Same Domain account

Post by ankur2ankur » 2022-09-22 18:56

Thanks for the reply.

I have already tried 2 different routes, but none of them work.

Can u please suggest me details of route.
Note: As I have told, I have pointed my mx to google workspace.

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

Re: Problem in Send mail to Same Domain account

Post by mattg » 2022-09-23 01:21

How about you show what you have tried, and why you know that it hasn't worked
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

ankur2ankur
New user
New user
Posts: 11
Joined: 2022-09-22 14:28

Re: Problem in Send mail to Same Domain account

Post by ankur2ankur » 2022-09-23 05:46

Route Detail:

General Tab:
Domain: *****.com (replaced with my domain name)
Target SMTP host: smtp.google.com
Port: 587
Connection Security: SSL/TLS
When Sender Matches route: A local email address
When Recipient Matches route: A local email address

Addresses Tab:
Deliver to all addresses

Delivery Tab:
Number of tries: 4
Minutes between every retry: 60
Server requires authentication: Unchecked

ankur2ankur
New user
New user
Posts: 11
Joined: 2022-09-22 14:28

Re: Problem in Send mail to Same Domain account

Post by ankur2ankur » 2022-09-23 05:48

This is the mail I get when sending mail:
---------------------------------------------------------------------------
Your message did not reach some or all of the intended recipients.

Sent: 22 Sep 2022 16:31:54 +0530
Subject: Test 81

The following recipient(s) could not be reached:

******@*****.com
Error Type: SMTP
Connection to recipients server failed.
Error: Host name: 172.253.62.27, message: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

Tried 4 time(s)



hMailServer

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

Re: Problem in Send mail to Same Domain account

Post by mattg » 2022-09-23 05:58

Gmail won't accept mail on port 587 unless it is AUTH

Try port 25 instead
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

ankur2ankur
New user
New user
Posts: 11
Joined: 2022-09-22 14:28

Re: Problem in Send mail to Same Domain account

Post by ankur2ankur » 2022-09-23 07:26

I tried Port 25, but still no success.

I have tried Server:
smtp.google.com
smtp.gmail.com

Tried Port: 25, 465, 587

I have tried above all credential one by one, none of them work.

Can we set route as other domain like gmail.com. All mail to xxxx@gmail.com or any other domain are being sent. So can we set route as mail from xxx@mydomain.com also sent as other domain?

ankur2ankur
New user
New user
Posts: 11
Joined: 2022-09-22 14:28

Re: Problem in Send mail to Same Domain account

Post by ankur2ankur » 2022-09-23 07:29

And yes account in hmailserver which is not exist on google server, will it work?

Ex:
abc@mydomain.com exist in hmailserver, but not in google workspace. Can I send mail from abc@mydomain.com (from hmailserver) to xyz@mydomain.com which is on google workspace?

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

Re: Problem in Send mail to Same Domain account

Post by palinka » 2022-09-23 08:39

ankur2ankur wrote:
2022-09-23 07:29
And yes account in hmailserver which is not exist on google server, will it work?

Ex:
abc@mydomain.com exist in hmailserver, but not in google workspace. Can I send mail from abc@mydomain.com (from hmailserver) to xyz@mydomain.com which is on google workspace?
Since you're paying for gmail, you should be able to relay through gmail: https://support.google.com/a/answer/2956491?hl=en

In this case, I would remove the domain from hmailserver and forget the routes. Set up your IP Ranges to only receive from the 3rd party app. If you want to auth, then create a fake domain (hmail.relay or whatever) and one user for authentication. Those credentials would be used by the 3rd party app to auth. Then change settings > protocols > smtp > delivery of email to set up the smtp relayer per the goolag instructions.

This way, you should be able to relay to any internal or external domains. Plus goolag handles all your reputational issues. :D

ankur2ankur
New user
New user
Posts: 11
Joined: 2022-09-22 14:28

Re: Problem in Send mail to Same Domain account

Post by ankur2ankur » 2022-09-23 09:00

We are not paying for gmail. We are educational Institute, we use google for education (free for educational Institute like us)

In this free version I can not set SMTP relay, for that we have to upgrade to paid plan. (And obviously, we are Not going to do that)

Please suggest any other solution.

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

Re: Problem in Send mail to Same Domain account

Post by palinka » 2022-09-23 10:19

ankur2ankur wrote:
2022-09-23 09:00
We are not paying for gmail. We are educational Institute, we use google for education (free for educational Institute like us)

In this free version I can not set SMTP relay, for that we have to upgrade to paid plan. (And obviously, we are Not going to do that)

Please suggest any other solution.
I think this is the best solution. :D

I think that you do not want to undertake the task of being an email administrator. I know I don't, which is why I use a paid relaying service. Dealing with reputational issues + mail delivery is a full time job. If your volume is low, a paid relay is pennies a day.

What kind of volume are we talking about here?

ankur2ankur
New user
New user
Posts: 11
Joined: 2022-09-22 14:28

Re: Problem in Send mail to Same Domain account

Post by ankur2ankur » 2022-09-23 14:44

Now I am Using Sendgrid SMTP Relaly instead of google.
But still problem continue.

I can send mail to user who has not account in hmailserver.

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

Re: Problem in Send mail to Same Domain account

Post by palinka » 2022-09-23 15:04

ankur2ankur wrote:
2022-09-23 14:44
Now I am Using Sendgrid SMTP Relaly instead of google.
But still problem continue.

I can send mail to user who has not account in hmailserver.
Which problem? Can't send to accounts in hmailserver? That's because hmailserver always delivers local mail if there is a local address to deliver to. Change the name of your domain or just delete it. Then all mail will be EXTERNAL mail (no possibility for local delivery).

ankur2ankur
New user
New user
Posts: 11
Joined: 2022-09-22 14:28

Re: Problem in Send mail to Same Domain account

Post by ankur2ankur » 2022-09-23 15:14

No, let explain with example:

In hMailServer I have 2 accounts: user1@mydomain.com, user2@mydomain.com

Now I want to send mail to "user3@mydomain.com" (not in hmailserver), from "user1@mydomain.com"

These mails are not delivered t user3@mydomain.com

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

Re: Problem in Send mail to Same Domain account

Post by palinka » 2022-09-23 15:17

ankur2ankur wrote:
2022-09-23 15:14
No, let explain with example:

In hMailServer I have 2 accounts: user1@mydomain.com, user2@mydomain.com

Now I want to send mail to "user3@mydomain.com" (not in hmailserver), from "user1@mydomain.com"

These mails are not delivered t user3@mydomain.com
palinka wrote:
2022-09-23 08:39
ankur2ankur wrote:
2022-09-23 07:29
And yes account in hmailserver which is not exist on google server, will it work?

Ex:
abc@mydomain.com exist in hmailserver, but not in google workspace. Can I send mail from abc@mydomain.com (from hmailserver) to xyz@mydomain.com which is on google workspace?
Since you're paying for gmail, you should be able to relay through gmail: https://support.google.com/a/answer/2956491?hl=en

In this case, I would remove the domain from hmailserver and forget the routes. Set up your IP Ranges to only receive from the 3rd party app. If you want to auth, then create a fake domain (hmail.relay or whatever) and one user for authentication. Those credentials would be used by the 3rd party app to auth. Then change settings > protocols > smtp > delivery of email to set up the smtp relayer per the goolag instructions.

This way, you should be able to relay to any internal or external domains. Plus goolag handles all your reputational issues. :D
Just replace gmail with sendgrid.

ankur2ankur
New user
New user
Posts: 11
Joined: 2022-09-22 14:28

Re: Problem in Send mail to Same Domain account

Post by ankur2ankur » 2022-09-23 15:22

I already did, these are the setting:

Route Detail:

General Tab:
Domain: *****.com (replaced with my domain name)
Target SMTP host: smtp.sendgrid.net
Port: 587
Connection Security: SSL/TLS
When Sender Matches route: A local email address
When Recipient Matches route: A local email address

Addresses Tab:
Deliver to all addresses

Delivery Tab:
Number of tries: 4
Minutes between every retry: 60
Server requires authentication: Checked
Credentials are as per given by SendGrid.

ankur2ankur
New user
New user
Posts: 11
Joined: 2022-09-22 14:28

Re: Problem in Send mail to Same Domain account

Post by ankur2ankur » 2022-09-24 06:10

Now its working.
Problem was with route setting
I was using port 587 instead of 465.

Again thanks for Support. :)

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

Re: Problem in Send mail to Same Domain account

Post by mattg » 2022-09-25 03:30

ankur2ankur wrote:
2022-09-24 06:10
I was using port 587 instead of 465.
That would depend entirely on what method of encryption you choose (StartTLS vs SSL/TLS)
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