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 Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-16-2010, 01:50 PM
Trained Alumni
 
Posts: 310
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
Reply With Quote
  #2 (permalink)  
Old 03-16-2010, 02:25 PM
Elite Member
 
Posts: 332
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
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
__________________
Best Regards
---
Masim "Vavai" Sugianto
Vavai Personal Blog
Personal Blog [ID]

Release 7.1.3_GA_3346.SLES11_64_20110930001521 SLES11_64 FOSS edition.
Reply With Quote
  #3 (permalink)  
Old 03-16-2010, 04:34 PM
Trained Alumni
 
Posts: 310
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
Reply With Quote
  #4 (permalink)  
Old 03-17-2010, 02:03 AM
y@w y@w is offline
Moderator
 
Posts: 658
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.
__________________
What a n00b!
Reply With Quote
  #5 (permalink)  
Old 03-17-2010, 07:47 AM
Moderator
 
Posts: 1,186
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
__________________
___________________________________
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
Reply With Quote
  #6 (permalink)  
Old 03-17-2010, 08:05 AM
Moderator
 
Posts: 7,911
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.
__________________
Reply With Quote
  #7 (permalink)  
Old 03-22-2010, 02:17 AM
Trained Alumni
 
Posts: 310
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
Reply With Quote
  #8 (permalink)  
Old 03-22-2010, 02:20 AM
Moderator
 
Posts: 7,911
Default

Yes, as AS/AV is only applied via Amavis on port 25.
__________________
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.