Per-domain SMTP host name

Use this forum if you want to suggest a new feature to hMailServer. Before posting, please search the forum to confirm that it has not already been suggested.

Do you need this feature?

Yes
61
80%
No
15
20%
 
Total votes: 76

ciano
New user
New user
Posts: 1
Joined: 2014-04-05 02:29

Re: Per-domain SMTP host name

Post by ciano » 2014-04-05 03:43

mattg wrote:And are you talking about outgoing mail and incoming mail??
The requested functionality is only for the outgoing mail.
mattg wrote:For incoming mail I'm still not sure how you envisage issuing a host name, before whoever is connecting tells you who they want...
For incoming mail you have only to configure the MX record, there isn't need of a new function.

jpn21
New user
New user
Posts: 1
Joined: 2014-04-08 08:22

Re: Per-domain SMTP host name

Post by jpn21 » 2014-04-08 09:12

This feature is essential for me. I have several domains on one server. I have unique IP addresses for each domain. All PTR and SPF records are set up correctly through the domain registrar. MXtools tests pass, only because I have added all domains to the welcome message separated by a comma. While this works, it is not a perfect solution. This means I have to expose all domains that are being used on the server to any servers email is sent to. 90% of the time this doesn't matter, but some servers still see it as spam. Not to mention this is very unprofessional and exposes more info than we would like to, as many of the domains are in no way related. This causes some servers to see that multiple sites are "hosted" on the same server, and flag it as a "shared host", despite the fact that it is a dedicated server that happens to have more than one site that we own and operate.

If each domain already has its own unique settings, why can't each domain have its own banner? While they can all share certain SMTP settings there is no reason that the banner can't vary based on the domain. One database field, one variable. If anyone can point me to the source code for the current version I can do this myself.

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Per-domain SMTP host name

Post by percepts » 2014-04-08 09:43


tarrakis
New user
New user
Posts: 4
Joined: 2014-03-05 14:20

Re: Per-domain SMTP host name

Post by tarrakis » 2014-04-14 15:58

Hi Mattg.

Yes, I know that this is open source. If I had the time to dedicate to adding this feature, believe me I would!

I was referring to SMTP (it doesn't make sense for incoming email, only for outgoing email).
And what I want is to be able to bind a particular domain (or even email account) to use a particular outgoing IP and RNDS pair (not a different port).

Bill48105
Developer
Developer
Posts: 6189
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: Per-domain SMTP host name

Post by Bill48105 » 2014-04-14 18:28

tarrakis wrote:Hi Mattg.

Yes, I know that this is open source. If I had the time to dedicate to adding this feature, believe me I would!

I was referring to SMTP (it doesn't make sense for incoming email, only for outgoing email).
And what I want is to be able to bind a particular domain (or even email account) to use a particular outgoing IP and RNDS pair (not a different port).
Think you were replying to percepts since he linked the SVN post, or maybe not.

If you want/need this & don't have the time what makes you think any of us who don't want/need it do?

I've been in the code enough to know this is not a trivial task to implement. It'd require major rewrites of many areas. For the few people who actually need this they should look at other options including running multiple hmailservers or using a different mail server that has that feature since those choices exist already & are practically trivial to implement vs hmailserver being able to handle IP per domain.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

mert_erdem
New user
New user
Posts: 4
Joined: 2015-04-29 12:59

Re: Per-domain SMTP host name

Post by mert_erdem » 2015-04-29 13:07

I think this feature is very important, I use multiple IP addresses and domain names, I need to use a server for each IP address, very expensive.

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

Re: Per-domain SMTP host name

Post by mattg » 2015-04-30 00:12

mert_erdem wrote:I need to use a server for each IP address...
WHY??
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

SemperFidelis
New user
New user
Posts: 7
Joined: 2015-03-16 20:40

Re: Per-domain SMTP host name

Post by SemperFidelis » 2015-05-02 19:20

Hello mert_erdem,

If you have several domains like domain1.com, domain2.com, domain3.com,
then you can define in the DNS settings of all domains, the same MX server, for instance: mail.domain1.com with the same IP address,
even for domain2.com and domain3.com.

This way you will be able to display only mail.domain1.com in the welcome message of your server, even using multiple domains.

For each domain as well you will use the same DKIM private key in the hmailServer settings (Domains, DKIM Signing),
and you will declare the same DKIM public key in the DNS of all domains.

If you use STARTTLS encryption, you will use also one single SSL certificate linked to mail.domain1.com.

Best regards,
SF

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

Re: Per-domain SMTP host name

Post by SorenR » 2015-05-02 19:50

Perhaps we need to stress that it is not always the technical staff setting the agenda and thus, sometimes, requests may - or may not - appear somewhat misplaced... :mrgreen:

https://www.youtube.com/watch?v=BKorP55Aqvg

Ehrm... Some of us have probably experienced similar to the above, first hand... I have...
SørenR.

The quantum rule of insecurity which states that the act of observing how vulnerable a host or service is changes the insecurity level of the service.

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

Re: Per-domain SMTP host name

Post by mattg » 2015-05-03 02:27

interesting clip SorenR...

But of course it happens the other way at times as well...

CEO 'We need Sales Tax added to our invoices'
IT Dept 'We will need a 6 month research timeframe, a new server to roll this additional computation out on, some more team members with additional skill sets to implement this major change. All end users will require bigger screens, training on how to use the update, and so we will need more staff to roll out the bigger screens and a contractor to outsource the training to...and that's not considering the impact on accounting, redundancy of the new equipment or the increased cost of power for the newer equipment. Have you done an environmental impact study, and had this been costed through finance? Is it legal for us to this?'

The outcome probably wouldn't even include added sales tax calculation for first two or three releases anyway... (I've seen this variation quite a few times, especially in Government Departments)

But yes, I agree that some of the requests here are made by non-technical people that don't know, but who think that they know.

“A little knowledge is a dangerous thing. So is a lot.”
― Albert Einstein

http://www.phrases.org.uk/meanings/a-li ... thing.html
http://www.goodreads.com/quotes/75179-a ... ng-so-is-a
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

mert_erdem
New user
New user
Posts: 4
Joined: 2015-04-29 12:59

Re: Per-domain SMTP host name

Post by mert_erdem » 2015-05-04 16:09

SemperFidelis wrote:Hello mert_erdem,

If you have several domains like domain1.com, domain2.com, domain3.com,
then you can define in the DNS settings of all domains, the same MX server, for instance: mail.domain1.com with the same IP address,
even for domain2.com and domain3.com.

This way you will be able to display only mail.domain1.com in the welcome message of your server, even using multiple domains.

For each domain as well you will use the same DKIM private key in the hmailServer settings (Domains, DKIM Signing),
and you will declare the same DKIM public key in the DNS of all domains.

If you use STARTTLS encryption, you will use also one single SSL certificate linked to mail.domain1.com.

Best regards,
SF
I want to use multiple IP addresses in multiple domains. For example,
for domain1.com - 104.207.157.3
for domain2.com - 104.207.157.4
as

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

Re: Per-domain SMTP host name

Post by jimimaseye » 2015-05-04 17:59

MErt, You could help the cause and discussion if you could explain WHY you need this style of set up.

So, why?
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
SorenR
Senior user
Senior user
Posts: 3169
Joined: 2006-08-21 15:38
Location: Denmark

Re: Per-domain SMTP host name

Post by SorenR » 2015-05-04 18:26

jimimaseye wrote:MErt, You could help the cause and discussion if you could explain WHY you need this style of set up.

So, why?
I'm guessing to save cost... 104.207.157.3 & .4 belong to the VULTR cloud... :wink:
SørenR.

The quantum rule of insecurity which states that the act of observing how vulnerable a host or service is changes the insecurity level of the service.

mert_erdem
New user
New user
Posts: 4
Joined: 2015-04-29 12:59

Re: Per-domain SMTP host name

Post by mert_erdem » 2015-05-05 10:29

jimimaseye wrote:MErt, You could help the cause and discussion if you could explain WHY you need this style of set up.

So, why?

I want my servers to reduce costs

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

Re: Per-domain SMTP host name

Post by jimimaseye » 2015-05-05 13:51

Ill be honest, I personally still understand how this would help with costs. Maybe Im just too simple.

Anyway, for what its worth, having read back over the thread and based on Martins responses and HINTS he has made it is fair to say there is no intention or possibility of this being implemented. So I would advise that if this was a deal breaker for people...then they have chosen the wrong software solution. (They could always ask for their money back ;-) )
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: 19979
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Per-domain SMTP host name

Post by mattg » 2015-05-06 00:13

jimimaseye wrote:Ill be honest, I personally still understand how this would help with costs.
Yep, Me too....

ONE free software serving multiple domains from single IP address = cost is single IP address and single computer.
One free software serving multiple domains from multiple IP addresses = cost is cost of multiple IP addresses, plus a single computer that can handle multiple IP addresses

I, for the life of me, can't understand how multiple IP addresses can be more expensive than a single IP address.

Perhaps someone from a 'marketing' background can explain.
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
SorenR
Senior user
Senior user
Posts: 3169
Joined: 2006-08-21 15:38
Location: Denmark

Re: Per-domain SMTP host name

Post by SorenR » 2015-05-06 19:48

mattg wrote:
jimimaseye wrote:Ill be honest, I personally still understand how this would help with costs.
Yep, Me too....

ONE free software serving multiple domains from single IP address = cost is single IP address and single computer.
One free software serving multiple domains from multiple IP addresses = cost is cost of multiple IP addresses, plus a single computer that can handle multiple IP addresses

I, for the life of me, can't understand how multiple IP addresses can be more expensive than a single IP address.

Perhaps someone from a 'marketing' background can explain.
Since hMail do not support the requested feature, you will need one instance/server for each domain=IP Address.

It's expensive not to compromise :mrgreen:
SørenR.

The quantum rule of insecurity which states that the act of observing how vulnerable a host or service is changes the insecurity level of the service.

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

Re: Per-domain SMTP host name

Post by mattg » 2015-05-07 03:12

SorenR wrote:
mattg wrote:I, for the life of me, can't understand how multiple IP addresses can be more expensive than a single IP address.

Perhaps someone from a 'marketing' background can explain.
Since hMail do not support the requested feature, you will need one instance/server for each domain=IP Address.
Yes I understand that, but I don't understand why anyone would NEED to not have multiple domains on a single instance of hMailserver...

What is the advantage in having a single IP address per domain?
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

mert_erdem
New user
New user
Posts: 4
Joined: 2015-04-29 12:59

Re: Per-domain SMTP host name

Post by mert_erdem » 2015-05-07 07:31

mattg wrote:
SorenR wrote:
mattg wrote:I, for the life of me, can't understand how multiple IP addresses can be more expensive than a single IP address.

Perhaps someone from a 'marketing' background can explain.
Since hMail do not support the requested feature, you will need one instance/server for each domain=IP Address.
Yes I understand that, but I don't understand why anyone would NEED to not have multiple domains on a single instance of hMailserver...

What is the advantage in having a single IP address per domain?
more than needed for enterprise users, the need to be different from one IP address.

a company ip address 104.207.157.3
b company ip address 104.207.157.4

as

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

Re: Per-domain SMTP host name

Post by mattg » 2015-05-07 08:48

Yes I know that you say it is needed, but WHY is it needed?

I host multiple commercial domains on my hMailserver and 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

kdiamond
Normal user
Normal user
Posts: 86
Joined: 2013-03-20 10:51

Re: Per-domain SMTP host name

Post by kdiamond » 2016-02-07 22:38

Hello.

I have 14 different IP addresses and 7 different domains, each on it's own IP, same server. I have managed to get it all working by Binding to local IP address global outgoing rules.

But the problem is domain reply rules. Only replies from the domain, that is listed in the SMTP/Delivery of email/Local host name, are OK (SPF pass, DKIM pass, DMARC pass). Replies from the rest of 6 domains will hit spam folder instantly (missing DKIM, SPF fail, dmarc fail). It's just a matter of a local host name setting which can be only one.

Can anyone suggest the workaround? Rules, scripts.... Anything?

Thank you

Br,
kd

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

Re: Per-domain SMTP host name

Post by mattg » 2016-02-08 00:05

Whitelist all of the domains hosted on your server, exclude mail FROM them being checked.
IP ranges excluding spam checking is another option

This certainly does not happen for me, and replies cross domains are a frequent occurrence on my system.

Perhaps you could show some SMTP + debug logging of this happening
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

kdiamond
Normal user
Normal user
Posts: 86
Joined: 2013-03-20 10:51

Re: Per-domain SMTP host name

Post by kdiamond » 2016-02-08 11:00

Thanks for reply Mattg.

I'm sorry I was unclear. Mail will hit the GMAIL spam folder when sent by HMS reply rule.

Example:
user@gmail.com sends mail to HMS with too large attachment. I set the rule for MAX size je 16 MB / reply / delete mail. HMS will send back the email, but will end up in GMAIL Spam folder, unless the domain name is set in the SMTP/Delivery of email/Local host name.

But I have 7 domains (each on it's own IP address) but I can set only one domain in Local host name. So if I set any of the 7 domain inside Local host name only that one will work good, others will not. They will hit GMAIL spam instantly. Checking the mail source (missing DKIM, SPF fail, dmarc fail)

I hope this makes it clear.

Thank you for your help

Br,
Dali

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

Re: Per-domain SMTP host name

Post by mattg » 2016-02-09 00:48

kdiamond wrote:HMS will send back the email, but will end up in GMAIL Spam folder, unless the domain name is set in the SMTP/Delivery of email/Local host name.
How are you sure that this is the reason?

Does normal mail to that gMail address end up in the SPAM fodler?
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

kdiamond
Normal user
Normal user
Posts: 86
Joined: 2013-03-20 10:51

Re: Per-domain SMTP host name

Post by kdiamond » 2016-02-09 01:39

How are you sure that this is the reason?
Let's look and compare the headers.

First: There's no DKIM in HMS Reply Rule header.
Second: Return-Path is empty.

Email source from Gmail Spam folder. (this email hits the spam folder)
"Received: from domain1.com (domain2.com. [xxx.xxx.xxx.xxx])
"Return-Path: <>"


When I set SMTP/Delivery of email/Local host name to domain2.com
Email source from Gmail Inbox.
"Received: from domain2.com (domain2.com. [xxx.xxx.xxx.xxx])
"Return-Path: <>"

Does normal mail to that gMail address end up in the SPAM fodler?
No, the normal mail is fine. (SPF pass, DKIM pass, DMARC pass)

Email source from inbox
"Received: from domain1.com (domain2.com. [xxx.xxx.xxx.xxx])
"Return-Path: <support@domain2.com>"

dkim=pass header.i=@domain2.com;

So the emails I sent to gmail and emails HMS Reply RULE is sending are different.

No DKIM and empty Return-Path header. Could this be the case for spam?

Thank you.

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

Re: Per-domain SMTP host name

Post by mattg » 2016-02-09 02:10

kdiamond wrote:No DKIM and empty Return-Path header. Could this be the case for spam?
You will need to check with gMail about why they mark this message as Spam.

No DKIN (Or more specificaly no DKIM where there should be one), and empty sender are likely to be marked as Spam by my server too. Certainly this will get automatically flagged buy scripts on my system and sent to a special 'errors" email address.

I will try and send a file bigger than my hamilserver allows from a my gmail account and see what happens...
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: 19979
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Per-domain SMTP host name

Post by mattg » 2016-02-09 02:24

OK

So if I set a max message size globally in my hMailserver it works as I'd expect. Message is bounced and notification appears in my gmail inbox, with the message being from the gMail server.

I have created an account rule, but my gmail message has been greylisted, so I wait and watch...
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

kdiamond
Normal user
Normal user
Posts: 86
Joined: 2013-03-20 10:51

Re: Per-domain SMTP host name

Post by kdiamond » 2016-02-09 08:53

Thank you for trying to help Mattg. I really appreciate it your efforts.
So if I set a max message size globally in my hMailserver it works as I'd expect. Message is bounced and notification appears in my gmail inbox, with the message being from the gMail server.
It's not about the type of Reply Rule. Any reply rule will hit spam. Rule works good as a rule. It will just hit the spam. BUT...Auto-reply will work good. What is the difference between Auto-reply function and Reply Rule I don't know.
You will need to check with gMail about why they mark this message as Spam.
I'm doing exactly that and I have found difference between ME or Auto-reply sending email to Gmail and RULE sending reply to Gmail. I'm comparing email sources received by Gmail. The one from Inbox(good) and the one from Spam(bad). They are different yes and I know what I need to do in order to avoid spam too.

Please do keep in mind that I use 7 domains from different IP addresses. I'm using Bind to local IP global rule to force each Domain sending from it's own IP. But I can not force each domain to send from it's own domain as only one domain can be set inside SMTP/Delivery of email/Local host name.

So the questions are:
1. Why is sending mails by me (Thunderbird client) or HMS Auto-reply any different than Reply Rule? Only Reply Rule will hit spam. No matter the Rule Criteria.
2. Why HMS is sending all 7 domains from 1 domain (Local host name). Each domain should be sent from it's own domain like:

"Received: from domain1.com (domain1.com. [xxx.xxx.xxx.xxx])"
"Received: from domain2.com (domain2.com. [xxx.xxx.xxx.xxx])"
"Received: from domain3.com (domain3.com. [xxx.xxx.xxx.xxx])"


Now its like:
"Received: from domain1.com (domain2.com. [xxx.xxx.xxx.xxx])"

3. Why Reply rule email source that hits the spam (unlike normal mail or Auto-reply) sent from my client has empty Return-Path: <> and no DKIM.

Thank you.

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

Re: Per-domain SMTP host name

Post by mattg » 2016-02-09 09:09

kdiamond wrote:3. Why Reply rule email source that hits the spam (unlike normal mail or Auto-reply) sent from my client has empty Return-Path: <> and no DKIM.
Because the reply message comes from the hMailserver Daemon, like normal NDRs

gMail see's your mail a spam when your hmailserver sends this daemon response.
(It didn't do that to me, but perhaps that was due to fact that I have declared the other account as a 'family member' in Google circles.

Is there a reason that you don't use hmailserver's builtin message size controls?
kdiamond wrote:2. Why HMS is sending all 7 domains from 1 domain (Local host name). Each domain should be sent from it's own domain like:

"Received: from domain1.com (domain1.com. [xxx.xxx.xxx.xxx])"
"Received: from domain2.com (domain2.com. [xxx.xxx.xxx.xxx])"
"Received: from domain3.com (domain3.com. [xxx.xxx.xxx.xxx])"

Now its like:
"Received: from domain1.com (domain2.com. [xxx.xxx.xxx.xxx])"
Have you confirmed that with Wireshark or something similar? Perhaps gmail adds the domain name....

From what I can tell, this only happens due to your particular setup, which I expect to be fairly unusual.

If this is really important to you, then hMailserver is probably not the correct product for you. Your options are to modify the hMailserver source to suit you, or put up with hMialserver as it is, or change to another product that does what you need.
The voting on this poll has been going on for a while, and there are few votes for this feature.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

kdiamond
Normal user
Normal user
Posts: 86
Joined: 2013-03-20 10:51

Re: Per-domain SMTP host name

Post by kdiamond » 2016-02-09 09:47

Because the reply message comes from the hMailserver Daemon, like normal NDRs
But it's the account rule. Not a global hMs rule. It is expected to be sent as a user account and not the Deamon. It should be no different than me sending email or auto-reply I believe.
Is there a reason that you don't use hmailserver's builtin message size controls?
I need it for only one account, rather than entire domain. But the problem is for all reply rule emails, not just size control.
Have you confirmed that with Wireshark or something similar?
No, just comparing the email sources in gmail received emails.
Perhaps gmail adds the domain name....
Maybe, but based on what? It's clear that if I change the SMTP/Delivery of email/Local host to that particular domain (where reply rule is) all problems go away.
From what I can tell, this only happens due to your particular setup, which I expect to be fairly unusual. If this is really important to you, then hMailserver is probably not the correct product for you. Your options are to modify the hMailserver source to suit you, or put up with hMialserver as it is, or change to another product that does what you need. The voting on this poll has been going on for a while, and there are few votes for this feature.
Apart from that little annoyance hMs is great. It does everything I need and much more. Changing server now means a lot of things and I really would not like to go there now. I wish I would know how to modify source, but I don't :( If possible I would pay for update/mod/script. Anything!!! Do you offer paid updates or custom modifications?

Thank you

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

Re: Per-domain SMTP host name

Post by mattg » 2016-02-09 15:32

kdiamond wrote:
Because the reply message comes from the hMailserver Daemon, like normal NDRs
But it's the account rule. Not a global hMs rule. It is expected to be sent as a user account and not the Deamon. It should be no different than me sending email or auto-reply I believe.
I agree >> github issue added >> https://github.com/hmailserver/hmailserver/issues/144
kdiamond wrote:If possible I would pay for update/mod/script.
You could ask Martin the developer, by sending an email to martin[at]hmailserver.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

kdiamond
Normal user
Normal user
Posts: 86
Joined: 2013-03-20 10:51

Re: Per-domain SMTP host name

Post by kdiamond » 2016-02-09 16:58

Thank you!!!

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

Re: Per-domain SMTP host name

Post by jimimaseye » 2016-02-09 18:14

I just did a simple test and agree: a REPLY action in any RULE, both 'account' or 'global', fails to fill the return path (leaving it as "Return-Path: <>") - irrespective of the reply FROM address is filled in or not. (Only the FROM field gets filled with an email address "From: name <whatever@replyaddress.here>"). Of course, without a valid address somewhere then the recipient isnt able to reply directly. (Isnt a valid return path a requirement of the RFC's? Dunno.)
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

jeffwong
New user
New user
Posts: 4
Joined: 2013-10-22 04:57

Re: Per-domain SMTP host name

Post by jeffwong » 2016-05-16 14:11

May I know is this issue solved?
Attachments
reply_rule.png

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

Re: Per-domain SMTP host name

Post by jimimaseye » 2016-05-16 14:25

jeffwong wrote:May I know is this issue solved?
A, What?? You are just showing a screen shot without explaining what your problem is.
B, Does this have anything to do with the thread topic?

Please start your own thread and make clear what your problem is.
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

jeffwong
New user
New user
Posts: 4
Joined: 2013-10-22 04:57

Re: Per-domain SMTP host name

Post by jeffwong » 2016-05-16 16:00

Pls just ignore it, if you think that unrelated. Tks

User avatar
Dravion
Senior user
Senior user
Posts: 1410
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: Per-domain SMTP host name

Post by Dravion » 2016-05-18 06:48

kdiamond wrote:Thank you!!!
Hi. I feel your pain and sometimes it feels like you talking against Windmills. But i think your per domain smtp per ip host problem can be solved with nginx as reverse smtp proxy which supports server name indication (sni) to do the trick.

3917541503
New user
New user
Posts: 10
Joined: 2015-04-16 03:50

Re: Per-domain SMTP host name

Post by 3917541503 » 2016-10-17 19:08

Hi all, I would desperately love to have hMailServer be able to send from every IP on the server, instead of a single one. This would help me partition email to help avoid getting blacklisted. Historically I've run 8 web servers and I just put hMailServer on each and split my email by importance to go thru 1 of the 8... and it has really helped. But now I've consolidated to 2 web servers with many IPs and I can't really partition effectively any more.

I understand that mattg & martin are not enthusiastic about this, but is there a $$$ amount that would make it worthwhile to just add? I happy to contribute a few hundred. My alternative is running many AWS instance just as mail servers which costs $100's/year or finding an alternate mail server software but I like hMailServer.

Martin, I can advise you exactly how to code it with minimal UI change and no chance of confusing other single-IP customers.

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

Re: Per-domain SMTP host name

Post by katip » 2016-10-17 21:12

many routers can do 1:1 NAT, i.e. you can define outgoing rules in this routers where 1 certain LAN source IP + destination port combination can be NATted to 1 certain WAN source IP.

now, takin' a guess:
1. bind a set of LAN IPs to HMS box NIC, such as 192.168.1.1-10 (for 10 domains)
2. in HMS, setup routes for each local domain with those target SMTP host IPs
3. in the router/firewall NAT each of them to different WAN IPs as you like

so, outbound mail from:
domain1.com will leave HMS from IP 192.168.1.1 and leave router with WAN IP 1.2.3.1
domain2.com will leave HMS from IP 192.168.1.2 and leave router with WAN IP 1.2.3.2
etc..

hah! what a prestige... :lol:

(btw, not sure about routes in HMS, if this will work with local targets, never tried)
Katip
--
HMS 5.7.0-B2428-LTS-64-bit, MySQL 5.7.24, SA 3.4.2, ClamAV 0.101.2 + SaneS

dekethegeek
New user
New user
Posts: 1
Joined: 2018-01-23 19:38

Re: Per-domain SMTP host name

Post by dekethegeek » 2018-01-23 20:03

I realize this thread is older than dirt, but if those (admittedly few) of you who really want this feature are willing to invest a few hundred dollars for a fix, why not add some RAM and HDD space to your server and virtualize your server OS of choice to run hMS instances separately?

IMO, this is the cleanest way to get a completely different setup for each of your email domains... you'd have distinct (and succinct :D ) SPF records, DKIM pairs, and DMARC policies, as well as the ability to customize any of the various hMS included options to your heart's content. This assumes you have multiple public IP addresses, a router that you are capable of configuring properly for "One to One NAT" or similar, and sufficient hardware requirements (and physical access to the Host server for installation of RAM & HDDs) to run the various virtualized instances. If your server is part of a cloud based service, you could pay for another instance. Of course, this "easy solution" to your situation is the reason services like AWS offer (and justifiably charge for) those additional instances. OTOH, perhaps if the need is sufficiently high this will be a justification to move from shared hosting to CoLo or even a local server.

Done properly, this is a very cost effective solution to implement. I generally assume that one who has multiple IP addresses at their disposal already has a capable router, but in case you don't there are current offerings from the Cisco RV series starting at ~$65 US. If you don't have spare Windows Server licences for the VMs, you could certainly get the job done handily with any number of *nix variants which are open source. Virtualization Host could be VMWare ($$$), but I've used VirtualBox (also Open Source) in a production environment for a generally similar purpose with no issues whatsoever. So, really you're just looking at the cost of additional RAM and HDDs (and perhaps adding another physical CPU to the server in question if it has an open slot).

This solution directly addresses the OP, separating each domain to its own public IP, and doesn't really add much administrative or hardware overhead... especially when running *nix as the guest OS (as one could choose to install a VERY light distro or a trimmed down version of a bigger one with which the user has more familiarity / experience).

In my experience, paid solutions tend to be more user friendly, sometimes more flexible, etc. but if you'd like to accomplish the same goal with free solutions, you may have to jump through a few more hoops. YMMV

P.S. This is my first post on the hMS forums, so I must say I *really* appreciate the stable, high functioning, and FREE! hMS... it's been a lifesaver for me!

Post Reply