[SOLVED] Changing subnet with ZCS 5.0.13

I have two Zimbra servers which have to deal with a new subnet, due to internal network restructuring.

Old subnet: 192.168.0/24
New subnet: 10.10.10.0/24

Server 1 is Production Server, runs ZCS 4.5.8_GA_1394. The subnet switch was straightforward.

Server 2 will be server at a new remote site (when installed there, it will have to change subnet again) which is being prepped here. It runs ZCS 5.0.13. It has been much more problematic to change. Here are the configurations I have changed already to conform to the new subnet (and, naturally, mailserver ip address):
1. /etc/hosts
2. DNS configuration - server FQDN now resolves correctly to its LAN address on new subnet, for local queries
3. Jetty bind addresses: forcibly changed via ZIMBRA_DIR/jetty/etc/jetty.properties.in

Now the problem I am still having is that in ZIMBRA_DIR/log/mailbox.log I get the following error message:

Code:

com.zimbra.common.service.ServiceException: system failure: Could not bind to port=7025 bindaddr=192.168.0.191 ssl=false useChannels=false
ExceptionId:main:1249308330531:d052ecb92e6e72d7
Code:service.FAILURE
at com.zimbra.common.service.ServiceException.FAILURE(ServiceException.java:253)
at com.zimbra.common.util.NetUtil.getServerSocket(NetUtil.java:72)
at com.zimbra.common.util.NetUtil.getTcpServerSocket(NetUtil.java:40)
at com.zimbra.cs.server.ServerConfig.getServerSocket(ServerConfig.java:110)
at com.zimbra.cs.tcpserver.TcpServer.(TcpServer.java:46)
at com.zimbra.cs.lmtpserver.LmtpServer.(LmtpServer.java:38)
at com.zimbra.cs.lmtpserver.LmtpServer.startupLmtpServer(LmtpServer.java:64)
at com.zimbra.cs.util.Zimbra.startup(Zimbra.java:212)

This is clearly because it is using the OLD address (192.168.0.191) instead of the new one (10.10.10.191). However I simply can't figure out how to change this configuration setting!

I have dumped LDAP and it confirms that all nodes from the domain downwards have (incorrectly) got:

Code:

zimbraMailTransport: lmtp:192.168.0.191:7025

I suspect the install script put this in.

However when I try to change this via zmprov I get the following error message, which I strongly suspect is caused by the same problem:

Well, since no one is replying, I am trying to check out the 5.0.13 source to find the problem. However since I am not familiar with Perforce it is a RIGHT PAIN trying to get at the source. I have now spent 2.5h and I can see the file I want in the source tree, I just can't get it to check out onto my local machine so I can actually read the thing. If someone could paste here the source for LmtpServer.java that would be a great help.

I think I had the same problem you're experiencing. I installed Zimbra at my work network and then changed the network for my client's net. When I tried to send mail I got the non-authorized sender message.
Check out http://www.zimbra.com/forums/adminis...8-subnets.html especially the zmprov command at the bottom.
Let me know if this helps.
cheers

Thanks very much post #3. Meanwhile I had managed to check out the source and the problem is indeed caused by a wrong config value for zimbraLmtpBindAddress. However WHICH FILE are you referring to that I should set it in? If it is jetty.properties.in, I didn't know I could add my own values here.

Post #4 thanks also. I will try #3 suggestion first since, as I mentioned, zmprov is also broken by this problem! And using an external tool to read LDAP, zimbraLmtpBindAddress is not set there in any entry.

A fix! (not very intuitive)

Well, after more digging around in the source code, I managed to work out a fix, based on a suggestion in this post.

However I have written explicit instructions below in the hope that the next person with this problem doesn't have to waste so much time on it. Please read ALL the instructions before trying to apply them, just so you don't get stuck in the middle.

Although I have now resolved my problem, I do feel rather as though I am using a hammer to crack a nut, so I will leave this thread open for a week in case anyone can point me to a more enlightened solution.

Instructions
Basically you need to use zmprov to alter your server's zimbraLmtpBindAddress property. HOWEVER as soon as you do this, all the OTHER bind address which previously had been happily not set (aka set to null) and apparently were happily defaulting to localhost, now cease to work, so you need to explicitly set them as well.

In the instructions below, I have set everything to the local ip_address of the server. On a single-server install it would probably working setting to 'localhost' but I have NOT tried this - since with previous versions of Zimbra I have encountered problems using 'localhost'.
1. Abbreviationsserver_fqdn - FQDN of your server, e.g. my-srv.yada.co.mzserver_ip - internal IP address of your server, e.g. 10.9.8.200attribute - name of a specific attribute in the LDAP config node for your server, e.g. zimbraLmtpBindAddress

2. Here are the commands you need to use for this fix.
a. How to CHECK one of the attributes:

Code:

zmprov --ldap getServer server_fqdn | grep attribute

...if this returns nothing then the attribute is not set at all.
b. How to SET one of the attributes to the new IP address:

Code:

zmprov --ldap modifyServer server_fqdnattributeserver_ip

...if this returns nothing then the attribute setting was successful - but you can always repeat command (a) above to make sure.

3. The actual fix
1. SET each of the following attributes using command (b) above, to the new IP address:

3. REMOVE old mailbox log (or move it somewhere if you want to keep it)

Code:

rm -f ZIMBRA_DIR/log/mailbox.log

4. START Zimbra again

Code:

zmcontrol start

5. CHECK mailbox.log to verify there are no connection errors (you may only see these after trying to USE the service in question if your zimbraXXXBindOnStartup attribute is set to FALSE (where XXX is Lmtp, Pop3 or Imap).

Code:

less ZIMBRA_DIR/log/mailbox.log

... page to the end and there should be no errors complaining "unable to bind to ...".
6. HEY PRESTO!