Receiving inbound mail from subdomains

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
New user
New user
Posts: 14
Joined: 2010-05-14 16:29

Receiving inbound mail from subdomains

Post by Eric24 » 2011-04-22 22:11

In short, what I need to do is receive mail on:

...without having to configure each of these domains, because over time, there will be 1000s of them. I read the post about wild-card subdomains not being supported (and not likely to be supported in the future). I realize that this is one solution (support for wild-card subdomains), but I wonder if there is another solution?

For example, is it possible to rewrite the "to" domain before a message is processed? By configuring my DNS MX records with a "*", the hMailServer IP address is resolved for (anything), so the remote server will certainly try to connect to the hMailServer. But can I get access to the incoming email (and rewrite the "to" domain to "") early enough in the receive operation so that hMailServer won't reject it?

Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: Receiving inbound mail from subdomains

Post by ^DooM^ » 2011-04-23 03:25

You could possibly receive email from any domain if you open up your server with external to external and no auth checked then setup a global rule.

message size > 0
Recipient NOT Contains configured@account
Forward to (configured@account)
Delete email

this would forward all email to one account.

You would add extra clauses to ignore domains but i suspect that doing this will be just as much work as before if you need to deliver email to specific users of specific subdomains.

Also this would open your server to spammers so you would need an additional script that denied delivery to anything except * there are tons of scripts in the user contributed section you can rip apart to do what you need.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

Post Reply