Results 1 to 6 of 6

Thread: send mails addressed to inexistant local domain users by smtp

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Posts
    11
    Rep Power
    10

    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

  2. #2
    Join Date
    Sep 2005
    Posts
    2,103
    Rep Power
    14

    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.

  3. #3
    Join Date
    Nov 2005
    Posts
    11
    Rep Power
    10

    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:
    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?

  4. #4
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    19

  5. #5
    Join Date
    Jun 2007
    Posts
    19
    Rep Power
    8

    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?

  6. #6
    Join Date
    Jun 2007
    Posts
    19
    Rep Power
    8

    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

Similar Threads

  1. postfix transport maps
    By pheonix1t in forum Administrators
    Replies: 12
    Last Post: 01-17-2009, 11:42 PM
  2. Zimbra fails after working for 2 weeks
    By Linsys in forum Administrators
    Replies: 10
    Last Post: 10-07-2008, 01:42 AM
  3. need advice on configuring zimbra to work with fax server
    By pheonix1t in forum Administrators
    Replies: 0
    Last Post: 07-11-2007, 08:46 PM
  4. domain coexistence
    By marcmac in forum Administrators
    Replies: 14
    Last Post: 06-30-2006, 02:19 PM
  5. send to local SMTP server?
    By BarrySDCA in forum Zimbra Connector for Outlook
    Replies: 1
    Last Post: 05-17-2006, 10:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •