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 Display Modes
  #11 (permalink)  
Old 11-06-2007, 05:41 PM
Member
 
Posts: 10
Default Did this ever work for you?

Hello ZoemDoef,

I am trying to do a similar thing by forwarding all zimbra mail to a mailarchiva system for obvious reasons. However, I tried what you attempted, that is, adding a transport map file to the postfix in zimbra, but I could not get zimbra to see the settings in the transport map file I created, and added to the config.

I suspect the problem has something to do with how zimbra uses the ldap file for the transport map, and not a standard hash transport file.

Would you please let me know if you got this to work, and what you ended up doing to config your zimbra if you did.

I would really appreciate the help.

Thanks.
Reply With Quote
  #12 (permalink)  
Old 07-18-2008, 08:41 AM
New Member
 
Posts: 4
Default zimbra per user migration and transport maps

Hi,

I'm live in Brasília, Brasil, i dont speak english fluently, but i'll try to explain my problem.

I'm a employe of Brasilian Federal Governament on MDA (Ministério do Desenvolvimento Agrário, www.mda.gov.br), today our mail solution is a combination of Postfix with OpenLDAP backend, Courier POP/IMAP, SASL, SpamAssassin+Razor+Pyzor, Clamav, Postgrey and Postix-policyd-spf-python, and our webmail is the poor SquirrelMail, now we want to migrate to zimbra, but we need to do a per user migration, leaving the old solution online, for security reasons, working togetter with zimbra.

So, we create a MX gateway who read a specific attribute in our main openLDAP tree, the name of this attribute is mailHost from qmail-schema.

See the transport maps of our gateway mx

# here we do a specific check, if the account exist go/deliver, if not, discard message...

local_recipient_maps = ldap:ldaplocal
ldaplocal_server_host = 200.xxx.xxx.xxx
ldaplocal_search_base = dc=br
ldaplocal_bind_dn = cn=admin,dc=nodomain
ldaplocal_bind_pw = password
ldaplocal_query_filter = (&(mail=%s)(accountStatus=active))
ldaplocal_result_attribute = uid

# here we check the mailHost attribute to deliver the message to your MTA

transport_maps = ldap:ldaptransport
ldaptransport_server_host = 200.xxx.xxx.xxx
ldaptransport_server_port = 389
ldaptransport_bind = yes
ldaptransport_bind_dn = cn=admin,dc=nodomain
ldaptransport_bind_pw = password
ldaptransport_timeout = 5
ldaptransport_search_base = dc=br
ldaptransport_query_filter = (&(mail=%s)(accountStatus=active))
ldaptransport_result_attribute = mailHost
ldaptransport_result_filter = relay:%s
ldaptransport_lookup_wildcards = no

mailHost could be zimbra.mda.gov.br or mail.mda.gov.br

The gateway works fine, but i need to create the same transport map on zimbra, because without this zimbra will deliver the message only localy.

I was read this post

postfix transport maps

and i'm trying to implement that, changing

POSTCONF transport_maps LOCAL postfix_transport_maps

on zmmta.cf to

POSTCONF transport_maps ldap:/opt/zimbra/conf/ldap-transport.cf,ldap:/opt/zimbra/conf/ldap-mda-transport.cf

See the content of lda-mda-transport.cf

server_host = 200.xxx.xxx.xxx
server_port = 389
bind = yes
bind_dn = cn=admin,dc=nodomain
bind_pw = password
timeout = 5
search_base = dc=br
query_filter = (&(mail=%s)(accountStatus=active)(mailHost=mail.md a.gov.br)
result_attribute = mailHost
result_filter = relay:%s
lookup_wildcards = no

But after this change, zimbra show a lot erros in mailbox.log

2008-07-18 10:55:12,903 WARN [btpool0-32] [name=jose.carvalho@terceirizado.mda.gov.br;mid=14; ip=10.0.102.254;ua=ZimbraWebClient - FF3.0 (Linux)/5.0.6_GA_2313.UBUNTU6;] ParsedMessage - Unable to parse part 1 (, text/plain) of message with Message-ID <29105227.781216389312901.JavaMail.root@zimbra.mda .gov.br>. Object will not be indexed.
com.zimbra.cs.object.ObjectHandlerException: error running ZimletHandler com_zimbra_url
at com.zimbra.cs.object.ObjectHandler.parse(ObjectHan dler.java:114)
at com.zimbra.cs.mime.MimeHandler.getObjects(MimeHand ler.java:266)
at com.zimbra.cs.mime.MimeHandler.getDocument(MimeHan dler.java:245)
at com.zimbra.cs.mime.ParsedMessage.analyzePart(Parse dMessage.java:1112)
at com.zimbra.cs.mime.ParsedMessage.analyzeBodyParts( ParsedMessage.java:373)
at com.zimbra.cs.mime.ParsedMessage.analyzeNonBodyPar ts(ParsedMessage.java:401)
at com.zimbra.cs.mime.ParsedMessage.analyzeFully(Pars edMessage.java:454)
at com.zimbra.cs.mailbox.Mailbox.addMessage(Mailbox.j ava:4494)
at com.zimbra.cs.mailbox.Mailbox.addMessage(Mailbox.j ava:4471)
at com.zimbra.cs.mailbox.MailSender.sendMimeMessage(M ailSender.java:223)
at com.zimbra.cs.mailbox.MailSender.sendMimeMessage(M ailSender.java:117)
at com.zimbra.cs.service.mail.SendMsg.doSendMessage(S endMsg.java:184)
at com.zimbra.cs.service.mail.SendMsg.handle(SendMsg. java:150)
at com.zimbra.soap.SoapEngine.dispatchRequest(SoapEng ine.java:410)
at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.jav a:267)
at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.jav a:159)
at com.zimbra.soap.SoapServlet.doPost(SoapServlet.jav a:266)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:727)
at com.zimbra.cs.servlet.ZimbraServlet.service(Zimbra Servlet.java:189)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(Ser vletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1093)
at org.mortbay.servlet.UserAgentFilter.doFilter(UserA gentFilter.java:81)
at org.mortbay.servlet.GzipFilter.doFilter(GzipFilter .java:132)
at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(Se rvletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle( SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(Se ssionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(Co ntextHandler.java:716)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebA ppContext.java:406)
at org.mortbay.jetty.handler.ContextHandlerCollection .handle(ContextHandlerCollection.java:211)
at org.mortbay.jetty.handler.HandlerCollection.handle (HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:139)
at org.mortbay.jetty.handler.rewrite.RewriteHandler.h andle(RewriteHandler.java:350)
at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at org.mortbay.jetty.HttpConnection.handleRequest(Htt pConnection.java:506)
at org.mortbay.jetty.HttpConnection$RequestHandler.co ntent(HttpConnection.java:844)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser. java:644)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpPa rser.java:205)
at org.mortbay.jetty.HttpConnection.handle(HttpConnec tion.java:381)
at org.mortbay.io.nio.SelectChannelEndPoint.run(Selec tChannelEndPoint.java:396)
at org.mortbay.thread.BoundedThreadPool$PoolThread.ru n(BoundedThreadPool.java:442)
Caused by: com.zimbra.cs.zimlet.ZimletException: null regex value
at com.zimbra.cs.zimlet.ZimletException.ZIMLET_HANDLE R_ERROR(ZimletException.java:36)
at com.zimbra.cs.zimlet.handler.RegexHandler.match(Re gexHandler.java:50)
at com.zimbra.cs.object.ObjectHandler.parse(ObjectHan dler.java:106)
... 42 more

What is the right way to create a new transport map in zimbra, to zimbra knowns where the message need to be delivered?
Reply With Quote
  #13 (permalink)  
Old 01-17-2009, 11:42 PM
Junior Member
 
Posts: 5
Default

Quote:
Originally Posted by Artturi View Post
I modified /opt/zimbra/conf/zmmta.cf.

Append a value to the appropriate line, like

'ldap:/opt/zimbra/conf/ldap-transport.cf,hash:/etc/zimbra/mytransport'

Then restart postfix
zmmtactl stop
zmmtactl start


Regards
I did this and it worked thanx, how do I do the same for "relay_recipients".
There is no relay_recipient_maps line in the zmmta.cf. file ?
Reply With Quote
Reply


Thread Tools
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.

Zimbrablog.com




 

Search Engine Optimization by vBSEO 3.1.0