LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-12-2011, 11:39 AM   #1
MheAd
Member
 
Registered: Jun 2007
Distribution: Ubuntu 14.04
Posts: 186

Rep: Reputation: 36
How to make Postfix gateway forward mail to Exchange + store a copy on local Cyrus IMAP?


Hi guys,
I've got this task to set up a Postfix based mail gateway that will act as primary MX and filter the email for spam (with amavisd-new/spamassassin) before transporting it to the backend Microsoft Exchange environment. So far nothing odd. But the thing is that I even need to set up a Cyrus IMAP instance, locally on the Postfix gateway that will recieve a copy of every incoming e-mail as well. The logic behind this setup is to have some kind of "disaster solution", if Exchange environment would be down, an email would still be avaiable in Cyrus IMAP so users can authenticate themseleves and reach it. I have no clue how to do this, I've been searching the net, looking through manuals, not a single clue how I can have these both transports at the same time. Could some kind of BCC be solution? Please note that this Cyrus IMAP should be entirely "autonomous". It should not be in any kind of synch with Exchange except for reception of a copy of every single incoming e-mail on the domain.

What I need, to start with, is the clues which parameters in Postfix I need to look into to point the email transport to both of these directions at the same time. By following documentation I can only see picture how to either send mail to Cyrus or forward to Exchange, but not both at the same time. As for the authentication / accounts and other specific things regarding the environment - I'll figure that out myself. I just need to know now how I can use transport_maps to forward the e-mail to Exchange and at the same time send a copy to local IMAP on the server.

Thanks in advance for any tip!

Last edited by MheAd; 11-12-2011 at 11:43 AM.
 
Old 11-15-2011, 04:08 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Try always_bcc
 
Old 11-16-2011, 01:25 AM   #3
MheAd
Member
 
Registered: Jun 2007
Distribution: Ubuntu 14.04
Posts: 186

Original Poster
Rep: Reputation: 36
Hi, and thanks for the reply.
I was suspecting, like written before, some of the bcc-options should do the trick. My intention is not to bcc to an optional address. Cyrus will have identical e-mail addresses to those that will exist in Exchange environment as well. So only a single bcc-option in Postfix won't do the trick, I assume (or am I missing something?). As soon as transport_maps directive is set pointing smtp to Exchange for that domain, Cyrus (listening localy on lmtp socket) is being ignored by Postfix, nothing will get there. Therefore, I assume something else needs to be done so the transport goes both ways.

Thanks in advance.
 
Old 11-16-2011, 04:57 PM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Ah I see .. sorry, I'm not aware of any easy way to do that
 
Old 11-17-2011, 12:19 PM   #5
MheAd
Member
 
Registered: Jun 2007
Distribution: Ubuntu 14.04
Posts: 186

Original Poster
Rep: Reputation: 36
Thanks anyway.
PS.
If you happend to know a _complicated_ way of solving this, that one will do too :=)
 
Old 11-17-2011, 03:40 PM   #6
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
I was thinking of a policy daemon, postfix supports policy daemons which can inspect mail during the connection and before it's submitted to the queue, but then you wouldn't have the actual content. Maybe a custom filter that fits in where amavis or spamassassin would ... ?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] mail is not forwarding for particular user from postfix to exchange. cj_cheema Linux - Server 8 09-25-2010 08:59 PM
Postfix not forwarding e-mails properly jasonswett Linux - Software 2 09-10-2010 03:32 PM
Postfix on Mandriva Gateway for Exchange Funkester Linux - Software 3 10-26-2007 08:37 AM
postfix, storing mails? Emanon Linux - Networking 2 08-21-2004 06:29 PM
POstfix not sending to a local exchange server hawkpaul Linux - Software 10 06-04-2003 07:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration