LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-28-2012, 09:30 AM   #1
bobbrandt
LQ Newbie
 
Registered: Sep 2006
Posts: 23

Rep: Reputation: 0
Postfix relay alias or bcc?


Very quickly - I am creating a test email system for a company and I want to populate the new system with live data. Both systems are using the same email addresses as they look at the same LDAP source. And I want to make as few changes to the live system as possible. The only change I want to make is to introduce one addition smart host which will relay mail to the two systems.

So, what I need is a very simple postfix relay system that will do the following:
  1. If an email comes in for email.address@domain.com it will send it to email.address@domain.com AND email.address@new.domain.com.
  2. If an email comes in for email.address@new.domain.com it will send it to email.address@new.domain.com.
  3. If an email comes in for email.address@old.domain.com it will send it to email.address@domain.com.
(I have already setup the new system to rewrite the addresses so it changes @new.domain.com to @domain.com)

At first I tried a combination of recipient_canonical_maps and recipient_bcc_maps, but it fails when it receives an email for email.address@old.domain.com. Instead of sending it JUST to email.address@domain.com it first changes the address to email.address@domain.com and then adds the BCC which might cause in infinite loop with the other systems.

I have also looked at using an ALIAS file, but it looks like it is only for Local Users and this machine needs to relay all mail.

I have also looked at using a virtual_alias_maps but it seems that the system does not want to send virtual domains and users via SMTP. Whenever I try I get an error:
Code:
postfix/trivial-rewrite[18227]: warning: regexp map /etc/postfix/transport, line 3: ignoring unrecognized request
Where my transport file is:
Code:
# Transport Map

/^(.*)@domain.com/      smtp:[mailserver.domain.com]
/^(.*)@new.domain.com/  smtp:[newmailserver.domain.com]
Thanks
Bob
 
Old 06-29-2012, 02:25 AM   #2
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Hi,

I don't know the exact configuration you need, but I would see the "relay_domains" parameter (around middle of the page) to try it.
It seems to me that is what you need ?

good luck
 
Old 06-29-2012, 05:01 AM   #3
bobbrandt
LQ Newbie
 
Registered: Sep 2006
Posts: 23

Original Poster
Rep: Reputation: 0
Thanks,

But I got the relay part working fine. The problem I am having is with the address rewriting.

Bob
 
Old 07-03-2012, 08:52 AM   #4
bobbrandt
LQ Newbie
 
Registered: Sep 2006
Posts: 23

Original Poster
Rep: Reputation: 0
I was able to get the system working by using multiple postfix instances on the same host.

I used the first (my postfix-in instance) to accept the mail and add the correct BCC addresses. Then used the second (my postfix-out instance) to rewrite the addresses and deliver the mail.

Thanks
Bob
 
Old 07-03-2012, 10:14 AM   #5
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Great !

Would you mind posting the needed configuration lines which you have set (removing/ blending any addresses)
for future references for anyone that may search for postfix.

Thank you.

Best Regards.
 
  


Reply

Tags
alias, bcc, postfix, relay


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
BCC mappings are not working in postfix dhiman.manish23 Linux - Server 8 07-28-2012 04:51 AM
Postfix/relay/alias Possible zuasive Linux - Server 1 11-04-2010 07:02 PM
Howto delete BCC on relay mail server - sendmail Jirka11 Linux - Server 2 01-14-2008 05:58 AM
Using BCC in Postfix clickster Linux - Software 3 06-14-2005 02:41 PM
postfix + procmail + BCc: not recieving BCc sebastianjustin Linux - Networking 0 08-26-2003 02:38 AM


All times are GMT -5. The time now is 10:31 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration