Results 1 to 7 of 7

Thread: [SOLVED] Deliver all mails to external MTA

  1. #1
    maxxer's Avatar
    maxxer is offline Trained Alumni
    Join Date
    Feb 2009
    Location
    Lecco, Italy
    Posts
    552
    Rep Power
    7

    Default [SOLVED] Deliver all mails to external MTA

    Hi.

    I need to do a "weird" thing: for some (or eventually all) local recipients, I need to deliver using an external MTA.

    So, say my server handles @example.com, and I use relay.myisp.com as external MTA, I need that ALL mails go thru relay.myisp.com, even if I'm sending to user1@example.com which is handled locally by zimbra.

    Mails will then get back (via fetchmail), and delivered as usual.

    So, the rule would be: mails generated locally for local accounts, gets outside anyway.

    How do I accomplish this?
    thanks
    YetOpen S.r.l. ~ Your open source partner
    Lecco (LC) - ITALY
    http://www.yetopen.it

  2. #2
    maxxer's Avatar
    maxxer is offline Trained Alumni
    Join Date
    Feb 2009
    Location
    Lecco, Italy
    Posts
    552
    Rep Power
    7

    Default

    Quote Originally Posted by vavai View Post
    How about this :

    Code:
    $ zmprov md example.com zimbraMailCatchAllAddress @example.com
    $ zmprov md example.com zimbraMailCatchAllForwardingAddress @example.com
    $ zmprov md example.com zimbraMailTransport smtp:relay.myisp.com
    I found this code in Split Domain document as well, but it doesn't work, because local users are still delivered using local zimbra. I need those messages to go outside.
    YetOpen S.r.l. ~ Your open source partner
    Lecco (LC) - ITALY
    http://www.yetopen.it

  3. #3
    y@w's Avatar
    y@w
    y@w is offline Moderator
    Join Date
    Jan 2008
    Posts
    658
    Rep Power
    8

    Default

    Well.. each user has a zimbraMailTransport explicitly set, so it will override whatever settings you put for the domain. You can wipe out that setting or set it explicitly for each user which should work.

    I'm not sure how you're going to get Zimbra to retrieve those messages, though.. Might I suggest that you just set the SMTP server that the web client uses to this external SMTP server and deliver them back to Zimbra? Then, of course, you would block access to Postfix on your Zimbra server for everyone except that external mail server. Then, all logs, messages, etc still pass through that server. Not sure if that helps your situation or not, but I thought I would throw that out there.

  4. #4
    LMStone's Avatar
    LMStone is offline Moderator
    Join Date
    Sep 2006
    Location
    477 Congress Street | Portland, ME 04101
    Posts
    1,367
    Rep Power
    10

    Default

    Quote Originally Posted by maxxer View Post
    Hi.

    I need to do a "weird" thing: for some (or eventually all) local recipients, I need to deliver using an external MTA.

    So, say my server handles @example.com, and I use relay.myisp.com as external MTA, I need that ALL mails go thru relay.myisp.com, even if I'm sending to user1@example.com which is handled locally by zimbra.

    Mails will then get back (via fetchmail), and delivered as usual.

    So, the rule would be: mails generated locally for local accounts, gets outside anyway.

    How do I accomplish this?
    thanks
    You don't why you want to do this; presumably the other MTA offers a feature Zimbra's Postfix does not?

    Possibly you will want to hack Zimbra's Postfix to use a milter:
    Postfix before-queue Milter support

    Not sure how that will survive Zimbra version upgrades...

    Hope that helps,
    Mark

  5. #5
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    As y@w has already said you can set zimbraMailTransport. Default is for it to be set to
    Code:
    zimbraMailTransport: lmtp:<zcs_server_fqdn>:7025
    And you can change that with
    Code:
    su - zimbra
    zmprov ma user@domain.com zimbraMailTransport:"relay.myisp.com:25"
    When you pull down the mail via fetchmail ensure that it is being injected on port 7025 otherwise you will end up with a mail loop.

  6. #6
    maxxer's Avatar
    maxxer is offline Trained Alumni
    Join Date
    Feb 2009
    Location
    Lecco, Italy
    Posts
    552
    Rep Power
    7

    Default

    it worked, thanks.

    in fetchmail I had to add
    Code:
    smtphost localhost/7025 lmtp
    to every user entry, and then
    Code:
    zmprov ma myaccount@mydomain.it zimbraMailTransport smtp:smtp.myisp.it:25
    for every user.

    on a side note, this bypasses zimbra as/av for the selected users
    YetOpen S.r.l. ~ Your open source partner
    Lecco (LC) - ITALY
    http://www.yetopen.it

  7. #7
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    Yes, as AS/AV is only applied via Amavis on port 25.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Unable to send mails to External Mail servers
    By vumail in forum Installation
    Replies: 4
    Last Post: 06-14-2011, 08:15 AM
  2. Daily mail report always reports "No messages found"
    By McPringle in forum Installation
    Replies: 42
    Last Post: 06-13-2011, 08:57 AM
  3. How to configure internal zimbra mta and external zimbra mta
    By danny.sierra@omtech.net in forum Installation
    Replies: 0
    Last Post: 10-20-2009, 06:50 AM
  4. Relay MTA for external delivery
    By relay23 in forum Administrators
    Replies: 5
    Last Post: 06-21-2009, 10:16 PM
  5. Replies: 4
    Last Post: 03-05-2007, 08:59 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
  •