Results 1 to 10 of 10

Thread: [SOLVED] Mail routing issue

  1. #1
    Join Date
    Mar 2010
    Posts
    8
    Rep Power
    5

    Post [SOLVED] Mail routing issue

    My company has 600 mailboxes with ISP
    I have a zimbra installed locally for 50 users.
    zimbar is not exposed to internet.
    We connect to ISP and download all emails for users who have mailboxes on
    Zimbra.

    My zimbra internal email domain is same as my email domain hosted with ISP.

    When i send a email from local zimbra mail box to a user with mailbox at ISP (both have same email domain) the emails are sent out via zimbra server and not thru the "smart host" that i have set.

    Any email sent from mailbox user on local zimbra server to outside domain is routed properly thru "smart host"

    "WebMail Relay MTA" field is populated with the IP of the smart host server with port no 25 mentioned.

    Example :
    UserA@testdomain.com - mailbox user on zimbra
    USerB@testdomain.com - mail box with ISP


    UserA sends email to UserB. Since UuerB is not a local mailbox on Zimbra server, the mail is routed to internet and to the ISP server.

    In the above situation, why is the email not routed thru the "smart host".
    How can i acheive 100% email routing thru "smart host" in local LAN


    Any speedy response would be highly appreciated.

    Desperate for a answer/solution.

    Thanks in advance.

    Rehan

  2. #2
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    Welcome to the forums

    Have you disabled DNS lookups on the MTA tab in the Admin GUI ?

  3. #3
    Join Date
    Mar 2010
    Posts
    8
    Rep Power
    5

    Post Mail routing issue

    Thanks for your prompt response.

    YES, the DNS lookup checkbox on the MTA tab is "not checked" under "Global Settings"and also under "Servers" in the GUI

    Thanks again.

  4. #4
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    What does /var/log/zimbra.log show for when it is routing the message ?

  5. #5
    Join Date
    Mar 2010
    Posts
    8
    Rep Power
    5

    Post Mail routing issue

    Kindly note that IP addresses and names have been changed to protect identity.


    The below log shows that the email to user3@tridomain.in is getting routed to the ISP (99.99.99.99) directly, whereas it should have been routed thru the smart host (192.168.1.21)

    ===============================
    Output from /var/log/zimbra.log
    ===============================

    Mar 26 12:19:33 mailsrv postfix/qmgr[20404]: 0E768B38038: from=<user1@tridomain.in>, size=1048, nrcpt=3 (queue active)
    Mar 26 12:19:33 mailsrv postfix/smtp[13384]: 0E768B38038: to=<myaccount@hotmail.com>, relay=192.168.1.21[192.168.1.21]:25, delay=0.05, delays=0.02/0.01/0/0.02, dsn=2.0.0, status=sent (250 ok 1269586563 qp 19384)

    Mar 26 12:19:33 mailsrv postfix/lmtp[368]: 0E768B38038: to=<user2@mum.com>, orig_to=<user2@tridomain.in>, relay=mailsrv.mum.com[192.168.1.15]:7025, delay=0.08, delays=0.02/0.01/0/0.05, dsn=2.1.5, status=sent (250 2.1.5 OK)

    Mar 26 12:19:42 mailsrv postfix/smtp[14694]: 0E768B38038: to=<user3@tridomain.in>, relay=mail.tridomain.in[99.99.99.99]:25, delay=9, delays=0.02/0.02/7.6/1.4, dsn=2.0.0, status=sent (250 OK)

    Mar 26 12:19:42 mailsrv postfix/qmgr[20404]: 0E768B38038: removed
    =================================


    =======
    Details
    =======

    192.168.1.15 = mailsrv.mum.com = is my local zimbra server
    We are using domain masquerading to mask all emails with our production email domain ie; "@tridomain.in"

    In zimbra, all mailboxes has 01 email address and 01 alias each.
    username@mum.com = EMAIL address
    username@tridomain.in = ALIAS


    192.168.1.21 = my smart host device.


    The above log shows an test email sent from user1@tridomain.in to 03 recepients :
    myaccount@hotmail.com, user2@tridomain.in , user3@tridomain.in

    user1@tridomain.in = mailbox on local Zimbra server (192.168.1.15)
    user2@tridomain.in = mailbox on local Zimbra server (192.168.1.15)
    user3@tridomain.in = mailbox with ISP (99.99.99.99)
    myaccount@hotmail.com = mailbox on Hotmail.


    Any help would be highly appreciated.

    Thanks
    Rehan

  6. #6
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    Quote Originally Posted by rehan View Post
    "WebMail Relay MTA" field is populated with the IP of the smart host server with port no 25 mentioned.
    Did you really set that to your smart-host or do you actually mean to say "Relay MTA for external delivery"

  7. #7
    Join Date
    Mar 2010
    Posts
    8
    Rep Power
    5

    Default

    Quote Originally Posted by uxbod View Post
    Did you really set that to your smart-host or do you actually mean to say "Relay MTA for external delivery"
    YES, under Global setting --> MTA tab --> "Relay MTA for external delivery" --> i have set the IP of my smart host 192.168.1.21 and port no. is 25

    This same setting flows down to the Server level object.

    So why does the emails stays in queue and not get routed to the smart host ? Is there some more setting that need to be done from Postfix?

    As of now i can see more tha 25 email in my queue, destined for "@tridomain.in", because the mailboxes with the ISP is full, Zimbra cannot deliver the emails.


    Thanks
    Rehan

  8. #8
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    The problem is that Postfix believe it is authorative for that domain so will attempt to delivery locally. What you can do is create the accounts that exists only at your ISP, within Zimbra, and from the command line set the following for each account
    Code:
    su - zimbra
    zmprov ma user@domain.com zimbraMailTransport:"my.smart.relay:25"
    That will force all emails for that account to be sent through your relay.

  9. #9
    Join Date
    Mar 2010
    Posts
    8
    Rep Power
    5

    Post Mail Routing Issue

    Quote Originally Posted by uxbod View Post
    The problem is that Postfix believe it is authorative for that domain so will attempt to delivery locally. What you can do is create the accounts that exists only at your ISP, within Zimbra, and from the command line set the following for each account
    Code:
    su - zimbra
    zmprov ma user@domain.com zimbraMailTransport:"my.smart.relay:25"
    That will force all emails for that account to be sent through your relay.

    Thanks for your response sir,

    For administrators point of view its not feasible to add several hundred accounts.

    My question is :
    When Zimbra does not finds the mailbox on local server it attempts to resolve the email domain on internet and connects to ISP server for successful delivery.

    Zimbra should not connect to internet, it should ideally forward the email to my smart host configured on the Global Settings -> MTA tab.

    For example :
    Zimbra is authoratative for @tridomain.in
    User1@tridomain.in mailbox is with ISP
    When User2@tridomain.in with mailbox locally on Zimbra sends a email to User1, Zimbra will not be able to find it on the local server and should use the setting on MTA to forward it to Smart host, and not try to relay it directly to internet.

    The answer to above will help me acheive my target of deploying a gateway level Anti-spam and anti-virus solution for all inbound and outbound emails on my email domain.

    Thanks
    Rehan

  10. #10
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    I appreciate it should *ideally* do something but that, AFAIK, is not the way Postfix handles it. Setting the smart-relay option within the global settings is effectively using the Postfix parameter relayhost. Any domain that Postfix is not authoritative for will be sent to that host. If you wish to send to a user, which has the same domain name, you have to instruct Postfix to know how to deal with it; hence setting zimbraMailTransport which again in-affect creates a Postfix transport table. If you have hundereds of accounts this could all be done from the CLI including the provision of the accounts. By following this method you would also make those addresses available through the GAL.

Similar Threads

  1. Server stats not showing and Status data is stale
    By tyarmas in forum Administrators
    Replies: 12
    Last Post: 02-10-2010, 02:33 PM
  2. [SOLVED] Zimbra OSS 6.04 will not start
    By powrrrplay in forum Installation
    Replies: 6
    Last Post: 01-25-2010, 06:15 PM
  3. [SOLVED] Fed 11 zcs install with existing apache
    By Lantzvillian in forum Installation
    Replies: 2
    Last Post: 10-05-2009, 11:11 AM
  4. [SOLVED] Mailserver down when send file attach of 50Mb
    By ZMilton in forum Administrators
    Replies: 20
    Last Post: 04-10-2008, 11:44 AM
  5. fresh install down may be due to tomcat
    By gon in forum Installation
    Replies: 10
    Last Post: 07-25-2007, 08:09 AM

Posting Permissions

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