Receiving email from any subdomain.

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
bloxxite
New user
New user
Posts: 5
Joined: 2020-08-05 02:30

Receiving email from any subdomain.

Post by bloxxite » 2020-08-05 02:37

Hey there. I had a pleasant experience with hmailserver after spending days trying to set up postfix to no avail.
I was wondering if I could have any subdomain forward to a root email using a rule or script?

I found this was related: https://www.hmailserver.com/forum/viewtopic.php?t=20444
Although he only needed to forward to a catch all email, I need to forward to the appropriate user.

Example:
bloxxite@this.is.an.example.com -> bloxxite@example.com

Thank you!

User avatar
SorenR
Senior user
Senior user
Posts: 3818
Joined: 2006-08-21 15:38
Location: Denmark

Re: Receiving email from any subdomain.

Post by SorenR » 2020-08-05 07:31

You can have aliases on your domain. Check Names in domain settings.
SørenR.

“Those who don't know history are doomed to repeat it.”
― Edmund Burke

bloxxite
New user
New user
Posts: 5
Joined: 2020-08-05 02:30

Re: Receiving email from any subdomain.

Post by bloxxite » 2020-08-05 17:11

I have multiple users and would like to forward from their subdomain of choice to the root domain to their account.
I can't do wildcard subdomains in aliases, plus if there were, I would have to create a new alias per user.

bloxxite
New user
New user
Posts: 5
Joined: 2020-08-05 02:30

Re: Receiving email from any subdomain.

Post by bloxxite » 2020-08-06 00:43

Alright, I'm gonna learn VBScript and make an SMTP External to External handler myself. Thank you!
When I am done hopefully I can edit this post to include my code.

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

Re: Receiving email from any subdomain.

Post by palinka » 2020-08-06 01:46

How will you receive the message if there is no mx record for this.is.an.example.com?

bloxxite
New user
New user
Posts: 5
Joined: 2020-08-05 02:30

Re: Receiving email from any subdomain.

Post by bloxxite » 2020-08-06 01:48

I can do * for my MX record.

mikedibella
Normal user
Normal user
Posts: 230
Joined: 2016-12-08 02:21

Re: Receiving email from any subdomain.

Post by mikedibella » 2020-08-06 02:00

bloxxite wrote:
2020-08-06 01:48
I can do * for my MX record.
Remember that *.example.com will only catch an.example.com, not is.an.example.com or this.is.an.example.com.

bloxxite
New user
New user
Posts: 5
Joined: 2020-08-05 02:30

Re: Receiving email from any subdomain.

Post by bloxxite » 2020-08-06 02:05

That's weird, because my server is getting the HELO from gmail when I do a subdomain like that.
It just thinks that the "To" is external so it wants authentication.

Image

User avatar
johang
Senior user
Senior user
Posts: 344
Joined: 2008-09-01 09:20

Re: Receiving email from any subdomain.

Post by johang » 2020-08-06 08:06

not all dns servers accept the input " * for mx record " but some surely do ( it is ok by for example https://tools.ietf.org/html/rfc1912 section 2.7 and https://tools.ietf.org/html/rfc4592#section-2.2.1 ) but be sure to know what to expect from it, 1 caveat could be.. there can only be 1 of info@, suport@, webmaster@, and so forth.
___________________________________________________________end of the line

Virinum
Normal user
Normal user
Posts: 134
Joined: 2018-11-23 14:42
Location: Germany

Re: Receiving email from any subdomain.

Post by Virinum » 2020-08-06 08:19

mikedibella wrote:
2020-08-06 02:00
bloxxite wrote:
2020-08-06 01:48
I can do * for my MX record.
Remember that *.example.com will only catch an.example.com, not is.an.example.com or this.is.an.example.com.
No, most DNS server don't reduce it to the first subdomain level only. So *.example.com will also serve a.b.c.d.example.com.

On wildcard certificates you're right. *.example.com is only valid for this first subdomain level.

mikedibella
Normal user
Normal user
Posts: 230
Joined: 2016-12-08 02:21

Re: Receiving email from any subdomain.

Post by mikedibella » 2020-08-28 01:07

On wildcard certificates you're right. *.example.com is only valid for this first subdomain level.
Yup, that's where I got my circuits crossed.

Post Reply