| 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.
|  | 
03-16-2010, 12:50 PM
| | Trained Alumni | |
Posts: 336
| | [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 | 
03-16-2010, 01:25 PM
| | | Quote:
Originally Posted by maxxer 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 | 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 | 
03-16-2010, 03:34 PM
| | Trained Alumni | |
Posts: 336
| | Quote:
Originally Posted by vavai 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. | 
03-17-2010, 01:03 AM
| | | 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. | 
03-17-2010, 06:47 AM
| | | Quote:
Originally Posted by maxxer 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
__________________
___________________________________ L. Mark Stone, CIO "Uptime. All the time."
477 Congress Street | Portland, ME 04101-3431 | (207) 772-5678
proactive maintenance and monitoring | technology consulting
Zimbra groupware | EMR implementations | private cloud hosting
| 
03-17-2010, 07:05 AM
| | | 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.
__________________ | 
03-22-2010, 01:17 AM
| | Trained Alumni | |
Posts: 336
| | 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  | 
03-22-2010, 01:20 AM
| | | Yes, as AS/AV is only applied via Amavis on port 25.
__________________ | | Thread Tools | Search this Thread | | | | | Display Modes | Linear Mode | | Why Join? Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.  |