Changing outgoing (SMTP) IP of mail server

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
arvixe
New user
New user
Posts: 11
Joined: 2008-03-17 12:07

Changing outgoing (SMTP) IP of mail server

Post by arvixe » 2009-08-27 23:03

I searched through the forums and google but wasn't able to find an answer.

Does hmailserver allow us to change the IP it uses to send mail? This is in case the main IP of the server gets blacklisted or greylisted by a specific user.

Furthermore, what would be useful is to create a list of IPs for hmailserver to use when sending mail based on the domain. If a client wants to pay for their own IP, it would be great if we could specify to hmailserver to send mail out of that IP for a specific domain name.

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

Re: Changing outgoing (SMTP) IP of mail server

Post by ^DooM^ » 2009-08-28 00:39

arvixe wrote:Does hmailserver allow us to change the IP it uses to send mail? This is in case the main IP of the server gets blacklisted or greylisted by a specific user.
As far as i am aware hMail uses the IP assigned to the NIC, windows handles the rest.
arvixe wrote:Furthermore, what would be useful is to create a list of IPs for hmailserver to use when sending mail based on the domain. If a client wants to pay for their own IP, it would be great if we could specify to hmailserver to send mail out of that IP for a specific domain name.
It would be useful, you should subimt a feature request :)
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

arvixe
New user
New user
Posts: 11
Joined: 2008-03-17 12:07

Re: Changing outgoing (SMTP) IP of mail server

Post by arvixe » 2009-10-08 03:44

This feature (1. being able to say which IP the email should leave from and 2. assign a domain to use a specific IP to send from) is becoming a more and more urgent feature that we need. We are willing to donate a large amount to the hMailServer project if they are willing to make efforts to include this in future releases. Where can we request this?

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

Re: Changing outgoing (SMTP) IP of mail server

Post by ^DooM^ » 2009-10-08 09:41

If at first you don't succeed, bomb disposal probably isn't for you! ヅ

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

Re: Changing outgoing (SMTP) IP of mail server

Post by ^DooM^ » 2009-10-08 23:17

Yes but you cannot assign per domain IP's all domains would listen/send on any SMTP IP you setup.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

User avatar
sheffters
Senior user
Senior user
Posts: 453
Joined: 2009-07-01 20:46
Contact:

Re: Changing outgoing (SMTP) IP of mail server

Post by sheffters » 2009-10-08 23:34

you could with a lot of hassle ...

... easier way would be to setup multiple vmware shells.

S.

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

Re: Changing outgoing (SMTP) IP of mail server

Post by ^DooM^ » 2009-10-09 00:03

You cannot setup multiple instances of hMail on the same server due to registry settings used by the administrator and probably that only one process can use one port.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

User avatar
sheffters
Senior user
Senior user
Posts: 453
Joined: 2009-07-01 20:46
Contact:

Re: Changing outgoing (SMTP) IP of mail server

Post by sheffters » 2009-10-09 13:25

Not to mention you would need a Base OS of Windows Enterprise server (to see more than 3GB's of ram).
any server x64 would do .. you dont need a core per server unless your mail is megga busy .. vmware is pritty good at dishing out cpu time.

If you really trim windows you can get server up in <512Mb running.

Id be tempted to have a x32 server with 3gb ram though ... a db server with 1gb ram ... and up to 3 mail servers in vmware (512 each) ... and trim the basic host system right down too.

S.

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

Re: Changing outgoing (SMTP) IP of mail server

Post by ^DooM^ » 2009-10-09 13:29

Or just buy multiple servers :)
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

DanCML
Normal user
Normal user
Posts: 103
Joined: 2009-07-08 17:56

Re: Changing outgoing (SMTP) IP of mail server

Post by DanCML » 2009-10-09 13:45

horndog wrote:
sheffters wrote:you could with a lot of hassle ...

... easier way would be to setup multiple vmware shells.

S.
Good idea but with the allocation of resources per shell you would soon run out. I think
you have to have at lest one CPU core dedicated to one shell and with the overhead of Windows server you need a minimum of 1GB of ram. It would take a very powerful server box with lots of CPU's/cores and ram to accomplish the task. Not to mention you would need a Base OS of Windows Enterprise server (to see more than 3GB's of ram).

Right now I'm running hMailServer on two Citrix XenServer VMs, both running on a single server with 1 CPU (Xeon E3110 in a Dell R200), with 700MB RAM per instance, each instance running Windows 2000 Server SP4 Standard, and it runs fine. We don't have a dedicated core per instance either, this same server is running a few other Windows 2000 SP4 instances too. So, while you would need a hefty machine to run multiples, you certainly don't need 1 core and 1GB RAM per instance ... :)

Also, you don't need Windows Enterprise Server to handle this - you can run ESXi, XenServer, or similar VM systems barebones - we run XenServer natively on the server. We also run XenServer natively on another larger server too with multiple Windows 2003 Server Standard and Windows 2000 Server Standard instances, and XenServer happily deals with the allocation of the 8GB total RAM across the instances (no instance has more than 2GB allocated so we don't need Enterprise editions of Windows). XenServer will happily handle 128GB RAM on a single server.

So far the single IP/domain handling hasn't really been a big issue - it was at first as I was moving from NTMail where we used to run one IP per domain and it ensured that blacklisting for one domain wouldn't affect another (AOL once blacklisted one of our IPs but at least it meant that all our other domains could still get mail through in the interim), but with tweaking to our SPF records so far we've had little trouble. We only run 20 or so domains though, and they're all for our company (different trading names for different web sites, plus aliases) so we're not bothered about having all incoming and outgoing mail have just one of our domain names in the SMTP commands.

maxfloden
Normal user
Normal user
Posts: 38
Joined: 2009-10-01 20:11

Re: Changing outgoing (SMTP) IP of mail server

Post by maxfloden » 2009-10-16 11:47

I just added a feature request that is related to this post. Please check if you think it would be useful for what you are trying achieve.

http://www.hmailserver.com/forum/viewto ... =2&t=16550

nicholash
New user
New user
Posts: 26
Joined: 2009-09-25 22:43

Re: Changing outgoing (SMTP) IP of mail server

Post by nicholash » 2009-11-13 21:19

^DooM^ wrote:
arvixe wrote:Does hmailserver allow us to change the IP it uses to send mail? This is in case the main IP of the server gets blacklisted or greylisted by a specific user.
As far as i am aware hMail uses the IP assigned to the NIC, windows handles the rest.
It just means when hMail sends mail it does not bind the IP before it sends.

This should be something easy to do. You just need to set an IP in the UI for a domain, when hMail is going to send see if this is set, in which case when it creates the socket it binds it to an IP before it sends.

If you do not bind, then it treats it if it is bound to 0.0.0.0 which the OS then uses the default nic card.

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

Re: Changing outgoing (SMTP) IP of mail server

Post by ^DooM^ » 2009-11-13 22:11

Feel free to donate to have this feature added nicholash
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

nicholash
New user
New user
Posts: 26
Joined: 2009-09-25 22:43

Re: Changing outgoing (SMTP) IP of mail server

Post by nicholash » 2009-11-13 22:53

how much does martin need donated to do this feature ?

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

Re: Changing outgoing (SMTP) IP of mail server

Post by ^DooM^ » 2009-11-13 23:20

If at first you don't succeed, bomb disposal probably isn't for you! ヅ

nicholash
New user
New user
Posts: 26
Joined: 2009-09-25 22:43

Re: Changing outgoing (SMTP) IP of mail server

Post by nicholash » 2009-11-17 12:20

I sent a message to martin as you suggested,still have not heard anything

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

Re: Changing outgoing (SMTP) IP of mail server

Post by ^DooM^ » 2009-11-17 12:23

He is a busy guy. I am sure he will answer you when he gets chance.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

User avatar
martin
Developer
Developer
Posts: 6837
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: Changing outgoing (SMTP) IP of mail server

Post by martin » 2009-11-18 18:51

I haven't seen any message.

nicholash
New user
New user
Posts: 26
Joined: 2009-09-25 22:43

Re: Changing outgoing (SMTP) IP of mail server

Post by nicholash » 2009-11-18 20:27

I sent an email on the 14/11 titiled "Changing outgoing (SMTP) IP of mail server" to martin@hmailserver.com basically summarizing this post and asking how much you would need.

User avatar
martin
Developer
Developer
Posts: 6837
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: Changing outgoing (SMTP) IP of mail server

Post by martin » 2009-11-18 20:37

Try to re-send the message and we'll discuss it. I've disabled some anti spam features so it may work better now.

I'm pretty sure I haven't received it. I typically don't delete messages from my inbox before I've replied to them.

nicholash
New user
New user
Posts: 26
Joined: 2009-09-25 22:43

Re: Changing outgoing (SMTP) IP of mail server

Post by nicholash » 2009-11-18 20:41

ok sent an email

maxfloden
Normal user
Normal user
Posts: 38
Joined: 2009-10-01 20:11

Re: Changing outgoing (SMTP) IP of mail server

Post by maxfloden » 2009-11-18 23:08

nicolash - i would be willing to chip in some , maybe all of us in this thread could contribute to get a better donation total?

What i have described in this thread is what i ideally want but anything that gets me closer to that is interesting.
http://www.hmailserver.com/forum/viewto ... =2&t=16550

User avatar
martin
Developer
Developer
Posts: 6837
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: Changing outgoing (SMTP) IP of mail server

Post by martin » 2009-11-18 23:12

This is not a matter of the number of dimes. Its a matter of exactly how it should be done (all people who have suggested it so far have different suggestions) and when I have time to do it. I'm thinking of making it a domain option and making it possible to override it using rules.

maxfloden
Normal user
Normal user
Posts: 38
Joined: 2009-10-01 20:11

Re: Changing outgoing (SMTP) IP of mail server

Post by maxfloden » 2009-11-18 23:26

I think a domain option would be a good solution that would give most of us at least a good part of what we are asking for and if you could do that I think it would most of us happy.

I don't know enough about rules to know what they can do but any further tweaking of this is of course good. (myself I'm looking to have several outgoing ip's per domain, depending on what my message content is, not only domain, as recommended by hotmail staff - eg one ip for newsletters, one for signup confirmations etc etc)

User avatar
martin
Developer
Developer
Posts: 6837
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: Changing outgoing (SMTP) IP of mail server

Post by martin » 2009-11-18 23:31

> (myself I'm looking to have several outgoing ip's per domain, depending on what my message content is, not only domain,
> as recommended by hotmail staff - eg one ip for newsletters, one for signup confirmations etc etc)

That would be possible using rules. For instance, you would be able to set up a rule which checks if the FromAddress is newsletter@example.com, then the specific local-address should be used.

nicholash
New user
New user
Posts: 26
Joined: 2009-09-25 22:43

Re: Changing outgoing (SMTP) IP of mail server

Post by nicholash » 2009-11-18 23:40

martin wrote:> (myself I'm looking to have several outgoing ip's per domain, depending on what my message content is, not only domain,
> as recommended by hotmail staff - eg one ip for newsletters, one for signup confirmations etc etc)

That would be possible using rules. For instance, you would be able to set up a rule which checks if the FromAddress is newsletter@example.com, then the specific local-address should be used.
based off that I could create a rule to do this:

*@domain1.com sends via 203.26.100.1
newsletter@domain1.com sends via 203.26.100.2
*@domain2.com send via 203.26.100.3

this would be a more flexible solution, most a better one then I suggested, tho more complicated for the user to set up. I would be happy with that tho.

maxfloden
Normal user
Normal user
Posts: 38
Joined: 2009-10-01 20:11

Re: Changing outgoing (SMTP) IP of mail server

Post by maxfloden » 2009-11-18 23:51

sounds good.

it would be more setup work for me than my initial suggestion (use same ip for outgoing as incoming ip message was sent to) and i would have to use specific sender addresses for each type (newsletter, signup confirmation etc) but I can see that this would be a more generic implementation that would be useful to more users of hmailserver.

nicholash
New user
New user
Posts: 26
Joined: 2009-09-25 22:43

Re: Changing outgoing (SMTP) IP of mail server

Post by nicholash » 2009-11-25 13:01

was curious if this was a feature you plan to implement any time soon ?

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

Re: Changing outgoing (SMTP) IP of mail server

Post by mattg » 2009-11-26 06:40

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

nicholash
New user
New user
Posts: 26
Joined: 2009-09-25 22:43

Re: Changing outgoing (SMTP) IP of mail server

Post by nicholash » 2009-12-13 20:08

I have created a clear feature request for this here:
http://www.hmailserver.com/forum/viewto ... =2&t=17025

Post Reply