LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-13-2006, 06:41 PM   #1
imraven
LQ Newbie
 
Registered: Jun 2006
Location: SLC, UT
Distribution: Ubuntu
Posts: 21

Rep: Reputation: 15
postfix: forcing rewrite of 'To' address when sending


Ok. Here is the scenario. I have postfix up and running in Gentoo w/ virtual hosts working using a mysql backend for the look ups. Here is what I'm missing. I have one domain that isn't a fully qualified domain. Tt's just a silly domain that we use inside the company for our internal applications, websites and such. We want this domain not to be able to send email outside of the domain. So let's say we have fqdn.com and internal.tld and they are both on the same postfix server. fqdn.com can do whatever it wants. Send to the rest of the world, whatever. However, when internal.tld attempts to send an email I need a way to rewrite the 'To' address to go to 'user@internal.tld' and then into a catch-all (which the catch-all is easy). Making it so the folks inside the network can only mail each other unless they have an account w/ fqdn.com then they can do whatever. Any advice is appreciated.

Thanks!

Brandon
 
Old 06-13-2006, 06:54 PM   #2
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,247
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
setup an MX record in your DNS that points to your own server.. if the destination is local theres no reason for the mail server to send it anywhere for delivery other than your own server..
 
Old 06-13-2006, 07:13 PM   #3
imraven
LQ Newbie
 
Registered: Jun 2006
Location: SLC, UT
Distribution: Ubuntu
Posts: 21

Original Poster
Rep: Reputation: 15
Right, but there is the problem. If the user attempts to send a message to an outside domain I want to be able to change it so the 'To' address the user is sending to gets rewritten so it doesn't ever get sent outside. Instead I want to rewrite the outgoing domain to the local internal domain.
 
Old 06-13-2006, 11:43 PM   #4
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,247
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
in that case I would setup ome mail server for internal use only (the server has no internet access and therefor cannot mail to an internet address) and one for Internet mail..
 
Old 06-15-2006, 11:07 AM   #5
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Quote:
Originally Posted by imraven
However, when internal.tld attempts to send an email I need a way to rewrite the 'To' address to go to 'user@internal.tld' and then into a catch-all (which the catch-all is easy).
How will you distinguish an internal.tld client from a fqdn.com client -- will it be based on DNS lookup or on the envelope From: address? Either way, you'll have to employ restriction classes. Someone asked a similar question here recently.
 
  


Reply


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
Postfix-Rewrite "From" address in mail on particular condition. dhruvypatel Linux - General 1 04-07-2006 08:39 AM
Postfix forcing mail to be delivered to root azrael808 Linux - Software 5 07-20-2005 04:42 PM
Postfix Help - Sending via third party smtp scarstens Linux - Networking 3 01-27-2004 06:55 PM
Postfix Sending bonkers Linux - General 0 06-07-2003 03:37 AM
Sending e-mail to IP address. roba Linux - General 3 08-21-2002 02:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration