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 (1) Thread Tools Display Modes
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 11-19-2005, 09:59 PM
Member
 
Posts: 11
Default send mails addressed to inexistant local domain users by smtp

hi

i am runing a zimbra m2 server (test installation) at home. since my internet connection is not stable enough to run a "real" mailserver, i am getting all my mails through fetchmail from a pop3 account i have on a mailserver belonging to my virtual server which is hosting my whole domain and it's locatet at a provider somwhere in switzerland.

now as far as fetching my email goes, everything works fine. fetchmail fetches my mail every 60 seconds and distributes it to local users, according to the pop accounts on my virtual server out on the internet. in order to organize my mails by filter rules, i tend to use many different email addresses which all go to my main account using a catch-all configuration. recieving them works, sorting them works, but i have a big problem sending my mails out:

when i try to send an email to an email address of my domain, which zimbra doesn't know, it shows an error when i try to send the message and tells me that this is an unknown user. well it certainly is with zimbra, but my mailserver on the virtual server at my provider would know what to do. so what i want is, i want to tell zimbra to forward all emails which are addressed to an inexistant local email address to a smtp server so that this smtp server can then send it through te internet and let it go where it should go, which is my mailserver at the internet provider, which will then recieve this mail, and forward it to my main account because of the catch-all statement... and then it will be fetched and i have it back

i understand that with the catch-all example this doesn't make sense, but imagine there is another user on that mail server at my provider's and he pops his mails directly from my mail server.. well he can't pop his mails from my zimbra server at home, because of my bad internet connection so he has to get the mails from my server at the provider. i could never write any mails to this friend again, since he is using the same domain as i do and zimbra won't allow me to send an email to a user of a domain it "owns" if it knows that this user doesn't exist ...

i hope i could explain my problem.. it's quite hard to describe i think sorry for bothering you.. any help would be greatly appreciated...

pascal
Reply With Quote
  #2 (permalink)  
Old 11-19-2005, 10:16 PM
Zimbra Employee
 
Posts: 2,073
Default smtp host

If you're sending your mail through the web UI, the thing to do is to set your zimbraSmtpHost setting in ldap to your ISPs mail server.

This will cause the mail from the web client to be delivered to the MTA at your ISP - if the mail is for you, your ISP will hand it back to the postfix you've got installed, and then delivered locally.

Your other option is to set the unknown_luser_relay(?) postfix item - check the postfix docs for the correct syntax.
Reply With Quote
  #3 (permalink)  
Old 11-21-2005, 04:56 AM
Member
 
Posts: 11
Default

i've looked at the postfix docs and config files and i have found out, that the fallback_transport parameter is what i might want to use in order to achieve my goal, because i could enter an alternative fallback transport to be used whenever no local user is found for an email address of the local domain.
it says, i have to change local_recipient_maps too, in order to allow the usage of undefined local users at all. so i have set those two parameters in main.cf as follows:
Code:
local_recipient_maps = 
fallback_transport = smtp:smtp.myprovider.ch
but i still get the same error message when i try to send an email to "testmail@mydomain.ch" where testmail is not a local user, but would be forwarded to my primary email account by my provider's mailserver as described above.. here's the error message i get in the webmail interface, after hitting the send button:
Quote:
msg - Invalid address: testmail@mydomain.ch
com.zimbra.cs.mailbox.MailServiceException: Invalid address: testmail@mydomain.ch
at com.zimbra.cs.mailbox.MailServiceException.SEND_AB ORTED_ADDRESS_FAILURE(MailServiceException.java:28 0)
at com.zimbra.cs.service.mail.SendMsg.sendMimeMessage (SendMsg.java:325)
at com.zimbra.cs.service.mail.SendMsg.sendMimeMessage (SendMsg.java:170)
at com.zimbra.cs.service.mail.SendMsg.sendMimeMessage (SendMsg.java:159)
at com.zimbra.cs.service.mail.SendMsg.handle(SendMsg. java:109)
at com.zimbra.soap.SoapEngine.dispatchRequest(SoapEng ine.java:249)
at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.jav a:163)
at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.jav a:84)
at com.zimbra.soap.SoapServlet.doPost(SoapServlet.jav a:226)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
at com.zimbra.cs.servlet.ZimbraServlet.service(Zimbra Servlet.java:148)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:107)
at org.apache.catalina.valves.AccessLogValve.invoke(A ccessLogValve.java:526)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:825)
at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:738)
at org.apache.tomcat.util.net.PoolTcpEndpoint.process Socket(PoolTcpEndpoint.java:526)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThr ead.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
class com.sun.mail.smtp.SMTPAddressFailedException: 550 <testmail@myodmain.ch>: Recipient address rejected: myodmain.ch

at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTranspo rt.java:1141)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTr ansport.java:536)
at javax.mail.Transport.send0(Transport.java:151)
at javax.mail.Transport.send(Transport.java:80)
at com.zimbra.cs.service.mail.SendMsg.sendMimeMessage (SendMsg.java:248)
... 25 more

code - mail.SEND_ABORTED_ADDRESS_FAILURE
method - ZmCsfeCommand.prototype.invoke
detail - soap:Sender

oh and yes, i did restart zimbra through zmcontrol stop and zmcontrol start

any idea what i'm missing?
Reply With Quote
  #4 (permalink)  
Old 11-21-2005, 09:02 AM
Zimbra Employee
 
Posts: 4,784
Default

Maybe you want luser_replay

http://www.postfix.org/postconf.5.html#luser_relay
Reply With Quote
  #5 (permalink)  
Old 06-17-2008, 01:25 AM
Intermediate Member
 
Posts: 18
Default

sorry for digging up this old thread but I need this solution too. Added the fallback_transport accordingly but still not working. Can't use the luser_relay as I need to forward it to a host not a user.

Anyone?
Reply With Quote
  #6 (permalink)  
Old 06-18-2008, 02:50 AM
Intermediate Member
 
Posts: 18
Default

Just want to update I found the solution in case anyone else needs it too.

To forward unknown recipient mails to another server, give this command

zmlocalconfig -e postfix_virtual_transport=smtp:next-hop-server-name-or-ip
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