« Alternate SMTP PortLFTP mirror script »

Bind Zimbra On Specific IP Address

03/05/08

Permalink 08:57:30 pm, by admin Email , 201 words   English (US)
Categories: Email

Bind Zimbra On Specific IP Address

Here's how to configure Zimbra services to bind to a specific IP address. These instructions apply to ZCS 5.x only. Assume that the IP address is [IP].

SMTP (TCP 25)

Edit /opt/zimbra/postfix/conf/master.cf.

Change:

smtp inet n - n - - smtpd

To:

[IP]:smtp inet n - n - - smtpd

WEB (TCP 80/443/admin ports)

Edit /opt/zimbra/jetty/etc/jetty.xml.in

After every line starting with:

<Set name="port">

Add:

<Set name="host">[IP]</Set>

POP/IMAP

Su to zimbra account.

Start zmprov:

./zmprov -s [IP]

Determine server name:

gas

Change bind addresses:

ms [DOMAIN] zimbraPop3BindAddress [IP]
ms [DOMAIN] zimbraPop3SSLBindAddress [IP]
ms [DOMAIN] zimbraImapBindAddress [IP]
ms [DOMAIN] zimbraImapSSLBindAddress [IP]

One additional trick is needed. Add these two IPTables rules to map 127.0.0.1:7071 to [IP]:7071.

/sbin/iptables -t nat -A PREROUTING -p tcp --destination 127.0.0.1 \
--dport 7071 -j DNAT --to-destination [IP]
/sbin/iptables -t nat -A OUTPUT -p tcp --destination 127.0.0.1 \
--dport 7071 -j DNAT --to-destination [IP]
/sbin/iptables -t nat -A PREROUTING -p tcp --destination 127.0.0.1 \
--dport 80 -j DNAT --to-destination [IP]
/sbin/iptables -t nat -A OUTPUT -p tcp --destination 127.0.0.1 \
--dport 80 -j DNAT --to-destination [IP]
/sbin/service iptables restart
/sbin/service iptables save

2 comments

Comment from: pedro [Visitor] · http://xubec.com
****-
Hi there!

Before getting my hand dirty on this... it surprised me that you don't mention clamav nor amavis-new in your post. Are you sure that is not necessary to modify anything in that sense?
09/24/09 @ 04:05
Comment from: admin [Member] Email
Pedro,
No changes are needed to the anti-virus because they connect on localhost instead of a public IP address.

Thanks,
Lee
09/25/09 @ 12:34

This post has 17 feedbacks awaiting moderation...

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
PoorExcellent
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
July 2010
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Reliable Penguin offers Linux Server Migrations, Systems Administration & Programming. Visit our main website at:

http://www.reliablepenguin.com

Search

Bookmark and Share

XML Feeds

powered by b2evolution free blog software