Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-07-2010, 04:03 PM
pgn pgn is offline
Junior Member
 
Posts: 7
Question Adding RelayMTA, per Wiki instructions, no longer sends -- "Connection timed out"

I'm migrating to a new Zimbra server.

The old server (CommunigatePro;same, lan -- one box over ...) is setup to use an outbound SMTP smarthost:

mail.messagingengine.com:587

It's a trivial setup -- enter one field in the AdminGUI, click SAVE. Done. Auth'ing with USERNAME:PASSWORD, it works great, as expected.

Now, I'm trying to setup the Zimbra box to use the same SMTP smarthost.

So far, I've been unable to 'convice' Zimbra & the SmartHost to 'play nice' ... any suggestions would be appreciated!

Here's what I've sone so far:

Following instructions at,

SMTP Relay
The Penguinlinux.com Blog Zimbra smtp relay through smart host smtp-auth
Outgoing SMTP Authentication - Zimbra :: Wiki

I've setup for SmartHost usage,
Code:
	rm /opt/zimbra/conf/relay_password*
	su - zimbra
	zmprov ms my.domain.com zimbraMtaRelayHost mail.messagingengine.com:587

	echo mail.messagingengine.com USERNAME:PASSWORD > /opt/zimbra/conf/relay_password
	/opt/zimbra/postfix-2.6.5.2z/sbin/postmap hash:/opt/zimbra/conf/relay_password

	/opt/zimbra/postfix-2.6.5.2z/sbin/postmap -q mail.messagingengine.com /opt/zimbra/conf/relay_password
		USERNAME:PASSWORD

	postconf -e smtp_sasl_auth_enable=yes
	postconf -e smtp_sasl_password_maps=hash:/opt/zimbra/conf/relay_password
	postconf -e smtp_use_tls=yes
	postconf -e smtp_tls_security_level=encrypt
	postconf -e smtp_sasl_mechanism_filter=plain
	postconf -e smtp_sasl_security_options=noanonymous
	postconf -e smtp_cname_overrides_servername=no

	zmlocalconfig -e postfix_smtp_sasl_auth_enable=yes
	zmlocalconfig -e postfix_smtp_sasl_password_maps=hash:/opt/zimbra/conf/relay_password
	zmlocalconfig -e postfix_smtp_use_tls=yes
	zmlocalconfig -e postfix_smtp_tls_security_level=encrypt
	zmlocalconfig -e postfix_smtp_sasl_mechanism_filter=plain
	zmlocalconfig -e postfix_smtp_sasl_security_options=noanonymous
	zmlocalconfig -e postfix_smtp_cname_overrides_servername=no

	exit
then, in Admin GUI, I DISABLE RelayMTA, and,

Code:
	su - zimbra
	zmcontrol stop
	zmcontrol start
	postfix reload
then, send from the webUI to "my.acct@sbcglobal.net":

Code:
	tail -f /var/log/zimbra.log
		Jun  7 15:29:44 mail postfix/smtpd[29002]: connect from my.domain.com[127.0.0.2]
		Jun  7 15:29:44 mail postfix/smtpd[29002]: 6CE98160183: client=my.domain.com[127.0.0.2]
		Jun  7 15:29:44 mail postfix/cleanup[29018]: 6CE98160183: message-id=<348475748.0.1275949783883.JavaMail.root@my.domain.com>
		Jun  7 15:29:44 mail postfix/smtpd[29002]: disconnect from my.domain.com[127.0.0.2]
		Jun  7 15:29:44 mail postfix/qmgr[19134]: 6CE98160183: from=<testacct@my.domain.com>, size=676, nrcpt=1 (queue active)
		Jun  7 15:29:44 mail amavis[16416]: (16416-01) ESMTP::10024 /opt/zimbra/data/amavisd/tmp/amavis-20100607T152944-16416: <testacct@my.domain.com> -> <my.acct@sbcglobal.net> SIZE=676 Received: from my.domain.com ([127.0.0.1]) by localhost (my.domain.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP for <my.acct@sbcglobal.net>; Mon,  7 Jun 2010 15:29:44 -0700 (PDT)
		Jun  7 15:29:44 mail amavis[16416]: (16416-01) Checking: L81hhvOQf3r9 MYNETS [127.0.0.2] <testacct@my.domain.com> -> <my.acct@sbcglobal.net>
		Jun  7 15:29:44 mail postfix/smtpd[29068]: connect from localhost.localdomain[127.0.0.1]
		Jun  7 15:29:44 mail postfix/smtpd[29068]: D4D19160184: client=localhost.localdomain[127.0.0.1]
		Jun  7 15:29:44 mail postfix/cleanup[29018]: D4D19160184: message-id=<348475748.0.1275949783883.JavaMail.root@my.domain.com>
		Jun  7 15:29:44 mail postfix/qmgr[19134]: D4D19160184: from=<testacct@my.domain.com>, size=1172, nrcpt=1 (queue active)
		Jun  7 15:29:44 mail amavis[16416]: (16416-01) FWD via SMTP: <testacct@my.domain.com> -> <my.acct@sbcglobal.net>,BODY=7BIT 250 2.0.0 Ok, id=16416-01, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as D4D19160184
		Jun  7 15:29:44 mail amavis[16416]: (16416-01) Passed CLEAN, MYNETS LOCAL [127.0.0.2] [127.0.0.2] <testacct@my.domain.com> -> <my.acct@sbcglobal.net>, Message-ID: <348475748.0.1275949783883.JavaMail.root@my.domain.com>, mail_id: L81hhvOQf3r9, Hits: -1.633, size: 676, queued_as: D4D19160184, 447 ms
		Jun  7 15:29:44 mail postfix/smtp[29025]: 6CE98160183: to=<my.acct@sbcglobal.net>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.53, delays=0.05/0.03/0.01/0.44, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=16416-01, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as D4D19160184)
		Jun  7 15:29:44 mail postfix/qmgr[19134]: 6CE98160183: removed
		Jun  7 15:29:44 mail amavis[16416]: (16416-01) extra modules loaded: /opt/zimbra/zimbramon/lib/x86_64-linux-thread-multi/auto/Net/SSLeay/autosplit.ix, /opt/zimbra/zimbramon/lib/x86_64-linux-thread-multi/auto/Net/SSLeay/randomize.al, IO/Socket/SSL.pm, Net/LDAP/Extension.pm, Net/SSLeay.pm
		Jun  7 15:29:47 mail postfix/smtp[29078]: D4D19160184: to=<my.acct@sbcglobal.net>, relay=sbcmx9.prodigy.net[207.115.37.23]:25, delay=2.5, delays=0.11/0.03/1.5/0.81, dsn=2.0.0, status=sent (250 2.0.0 o57MTkW9015367 Message accepted for delivery)
		Jun  7 15:29:47 mail postfix/qmgr[19134]: D4D19160184: removed
		Jun  7 15:30:02 mail zimbramon[32138]: 32138:info: 2010-06-07 15:30:02, QUEUE: 0 0
		Jun  7 15:30:06 mail zmmailboxdmgr[1010]: status requested
		Jun  7 15:30:06 mail zmmailboxdmgr[1010]: status OK
message is successfully delivered/received @ "my.acct@sbcglobal.net".

Next, I *EN*ABLE RelayMTA in Admin GUI, and,

Code:
	su - zimbra
	zmcontrol stop
	zmcontrol start
	postfix reload
then, again, send to "my.acct@sbcglobal.net". This time,

Code:
	tail -f /var/log/zimbra.log
		Jun  7 15:42:58 mail postfix/smtpd[3378]: connect from my.domain.com[127.0.0.2]
		Jun  7 15:42:58 mail postfix/smtpd[3378]: 87DEB160124: client=my.domain.com[127.0.0.2]
		Jun  7 15:42:58 mail postfix/cleanup[3382]: 87DEB160124: message-id=<1560766941.0.1275950577988.JavaMail.root@my.domain.com>
		Jun  7 15:42:58 mail postfix/smtpd[3378]: disconnect from my.domain.com[127.0.0.2]
		Jun  7 15:42:58 mail postfix/qmgr[3383]: 87DEB160124: from=<testacct@my.domain.com>, size=677, nrcpt=1 (queue active)
		Jun  7 15:42:58 mail amavis[30566]: (30566-01) ESMTP::10024 /opt/zimbra/data/amavisd/tmp/amavis-20100607T154258-30566: <testacct@my.domain.com> -> <my.acct@sbcglobal.net> SIZE=677 Received: from my.domain.com ([127.0.0.1]) by localhost (my.domain.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP for <my.acct@sbcglobal.net>; Mon,  7 Jun 2010 15:42:58 -0700 (PDT)
		Jun  7 15:42:58 mail amavis[30566]: (30566-01) Checking: 9MQZKFczyl97 MYNETS [127.0.0.2] <testacct@my.domain.com> -> <my.acct@sbcglobal.net>
		Jun  7 15:42:58 mail postfix/smtpd[3387]: connect from localhost.localdomain[127.0.0.1]
		Jun  7 15:42:58 mail postfix/smtpd[3387]: EF287160184: client=localhost.localdomain[127.0.0.1]
		Jun  7 15:42:58 mail postfix/cleanup[3382]: EF287160184: message-id=<1560766941.0.1275950577988.JavaMail.root@my.domain.com>
		Jun  7 15:42:59 mail postfix/qmgr[3383]: EF287160184: from=<testacct@my.domain.com>, size=1173, nrcpt=1 (queue active)
		Jun  7 15:42:59 mail amavis[30566]: (30566-01) FWD via SMTP: <testacct@my.domain.com> -> <my.acct@sbcglobal.net>,BODY=7BIT 250 2.0.0 Ok, id=30566-01, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as EF287160184
		Jun  7 15:42:59 mail amavis[30566]: (30566-01) Passed CLEAN, MYNETS LOCAL [127.0.0.2] [127.0.0.2] <testacct@my.domain.com> -> <my.acct@sbcglobal.net>, Message-ID: <1560766941.0.1275950577988.JavaMail.root@my.domain.com>, mail_id: 9MQZKFczyl97, Hits: -1.706, size: 677, queued_as: EF287160184, 385 ms
		Jun  7 15:42:59 mail postfix/smtp[3384]: 87DEB160124: to=<my.acct@sbcglobal.net>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.52, delays=0.1/0.01/0.01/0.38, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=30566-01, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as EF287160184)
		Jun  7 15:42:59 mail postfix/qmgr[3383]: 87DEB160124: removed
		Jun  7 15:42:59 mail amavis[30566]: (30566-01) extra modules loaded: /opt/zimbra/zimbramon/lib/x86_64-linux-thread-multi/auto/Net/SSLeay/autosplit.ix, /opt/zimbra/zimbramon/lib/x86_64-linux-thread-multi/auto/Net/SSLeay/randomize.al, IO/Socket/SSL.pm, Net/LDAP/Extension.pm, Net/SSLeay.pm
		Jun  7 15:43:29 mail postfix/smtp[3389]: connect to in1.smtp.messagingengine.com[66.111.4.75]:587: Connection timed out
the message is never delivered. Note the

Code:
		Jun  7 15:43:29 mail postfix/smtp[3389]: connect to in1.smtp.messagingengine.com[66.111.4.75]:587: Connection timed out
response from the smarthost.

What else needs to be configured/changed to get Zimbra/Postfix to use the smarthost?
Reply With Quote
  #2 (permalink)  
Old 06-07-2010, 05:39 PM
pgn pgn is offline
Junior Member
 
Posts: 7
Default

There seem to be two issues 'in the way' here.

(1) The smarthost I use, fastmail.fm, requires smarthost address, (relayhost=... in /opt/zimbra/postfix/conf/main.cf) to work (cref: http://wiki.fastmail.fm/index.php?ti...ix#Basic_Setup)

(2) Zimbra's AdminUI does NOT accept brackets in the RelayMTA field.

If I try to enter, "[mail.messaging.engine]", it complains "Value did not match valid values.", and the "Save" button remains greyed out & inactive.

Either there's an escape sequence required to pass those "[]", or it's a bug in the Form validation parsing,

Atm, manual entry seems to be the only way available ...

unfortunately, I can't seem to get the changes to stick.

if I
Code:
postconf -e relayhost=[mail.messagingengine.com]:587
postfix reload
the change to main.cf is immediately made, and smarthost works. BUT, the changes don't persist across server restart. After restart, the value in main.cf is rewritten to whatever's been last successfully etered in the AdminUI -- either (empty), or something withOUT brackets ...

reading,

"Persistence across Zimbra restarts"
Outgoing SMTP Authentication - Zimbra :: Wiki

If I instead try,
Code:
zmlocalconfig -e postfix_relayhost=mail.messagingengine.com:587
zmcontrol stop && zmcontrol start
the change DOES persist across restart, but, of course, I'm missing the brackets.

If I try
Code:
zmlocalconfig -e postfix_relayhost=[mail.messagingengine.com]:587
zmcontrol stop && zmcontrol start
then, after restart, I'm back to (empty) or last OK entry from AdminUI again.

seems that zimbra does not like brackets EITHER in the AdminUI, or in the zmlocalconfig parser ...
Reply With Quote
  #3 (permalink)  
Old 06-07-2010, 09:10 PM
pgn pgn is offline
Junior Member
 
Posts: 7
Default

(1) the smarthost, @ fastmail.fm, apparently requires the RelayMTA spec'n in the following format:

relayhost = [mail.messagingengine.com]

including the brackets.

(cref: http://wiki.fastmail.fm/index.php?ti...iguringPostfix)

(2) Zimbra's AdminUI won't accept brackets in the Field.

(3) manual intervention with,

Code:
zmprov mcf zimbraMtaRelayHost [mail.messagingengine.com]:587
zmcontrol stop
zmcontrol start
grep relayhost /opt/zimbra/postfix/conf/main.cf
	relayhost = [mail.messagingengine.com]:587
seems to workaround successfully.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.