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


View Poll Results: Which Mail Server is better in performance.
Sendmail 1 50.00%
Qmail 0 0%
Postfix 1 50.00%
Ha Ha Ha Microsoft Exchange 0 0%
Voters: 2. You may not vote on this poll

Reply
  Search this Thread
Old 05-17-2003, 07:16 PM   #1
LinuxGod
LQ Newbie
 
Registered: Aug 2001
Location: Cave Mountain
Distribution: Redhat Only
Posts: 29

Rep: Reputation: 15
Question Postfix in The Same Name Space.


I was wondering if anyone knew a way to run postfix in the same name space lets say: example below

This is the transport.cf file:
-----
namespace.com local:
namespace.com smtp:carrotsoup.com
-----

Now I know this will not work but just to give you a quick dirty picture of what I am trying to do. I want mail to deliver local
if the uer exists on the local machine, if not relay it to the nexthop.

Any experts out there who have done this before.


Thanks
LinuxGoD
 
Old 05-17-2003, 08:27 PM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I'm not sure I understand.

Normally what would happen if you enable your mail server to relay mail would be that if the user were local it would put the mail in their mailbox, if not it would lookup the MX record of the domain in the email address and attempt to send it there.

example

mailto:david = local delivery
mailto:david@localdomain = local delivery

mailto:david@otherdomain.com

david@slacker:~$ dig MX otherdomain.com

; <<>> DiG 9.2.1 <<>> MX otherdomain.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50754
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2

;; QUESTION SECTION:
;otherdomain.com. IN MX

;; ANSWER SECTION:
otherdomain.com. 3600 IN MX 10 mail.otherdomain.com.


the server will attempt to connect to mail.otherdomain.com and send the message as rcpt to: david



If this is not what you mean please explain further
 
Old 05-18-2003, 12:54 AM   #3
LinuxGod
LQ Newbie
 
Registered: Aug 2001
Location: Cave Mountain
Distribution: Redhat Only
Posts: 29

Original Poster
Rep: Reputation: 15
Ok here we go.

Same name space domains (otherdomain.com).
Both have email accounts @otherdomain.com.

1. 1.otherdomain.com (Primary)
2. 2.otherdomain.com (Secondary)
3. MX Record is 1.otherdomain.com

1.otherdomain.com -> 2.otherdomain.com

Conclusion:
I want (1.otherdomain.com) to accept mail for @otherdomain.com
and if that account is not local to (1.otherdomain.com)
Relay it over to (2.otherdomain.com).
Who also accepts mail for @otherdomain.com

Transport.cf
---------------
otherdomain.com local:
otherdomain.com smtp:2.otherdomain.com
---------------

Now this does not work because the left side of the file
cannot have duplicate domain names.

But the idea is straight forward.

Transport.cf
---------------
otherdomain.com local:
otherdomain.com smtp:2.otherdomain.com
---------------

Scenario: Mail (bob@otherdomain.com) for otherdomain should first be checked on 1.otherdomain.com for incoming email for bob@otherdomain.com, if it exist here locally in the lookup tables delivery local, but if not relay to 2.otherdomain.com.

Thanks
LinuXGoD
 
Old 05-18-2003, 01:04 AM   #4
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
so you say if fred@1.domain.com is not a valid user on 1.domain.com then send freds mail to fred@2.domain.com


this will work, but it's probably not what your after


on 1.domain.com

/etc/aliases

fred: fred@2.domain.com


Last edited by DavidPhillips; 05-18-2003 at 01:06 AM.
 
Old 05-18-2003, 01:08 AM   #5
LinuxGod
LQ Newbie
 
Registered: Aug 2001
Location: Cave Mountain
Distribution: Redhat Only
Posts: 29

Original Poster
Rep: Reputation: 15
You got it
 
Old 05-18-2003, 01:17 AM   #6
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
so that will work for you?
 
Old 05-18-2003, 01:21 AM   #7
LinuxGod
LQ Newbie
 
Registered: Aug 2001
Location: Cave Mountain
Distribution: Redhat Only
Posts: 29

Original Poster
Rep: Reputation: 15
Can't use aliases the 2.otherdomain.com machine is a
exchange 5.5 server that has over 5000 accounts.

I need some way of saying:

if $recipient is in 1.otherdomain.com send to local
if not relay to 2.otherdomain.com




Thanks
LinuXGoD
 
Old 05-18-2003, 01:28 AM   #8
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I'm thinking there should be a way to have the exchange server as a FallbackMXHost

can it accept mail addressed to user@1.domain.com using virtual domains
 
Old 05-18-2003, 01:37 AM   #9
LinuxGod
LQ Newbie
 
Registered: Aug 2001
Location: Cave Mountain
Distribution: Redhat Only
Posts: 29

Original Poster
Rep: Reputation: 15
No it cannot, 2.otherdomain.com knows nothing about 1.otherdomain except this is where it's email comes from.

There gotta be a way to pass email from the primary to the secondary in the same namespace.

Thanks
LinuXGoD
 
Old 05-18-2003, 02:37 AM   #10
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
yes it should, the domain will need to be rewritten right?

user@1.domain.com needs to be rewritten to user@2.domain.com

or server at 2.domain.com will send it back to 1.domain.com

so we need if $user is invalid then relay to $user@2.domain.com

that's a good one.
 
Old 05-18-2003, 02:50 AM   #11
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
see, the thing that seems wrong with this is that if the user on 2.domain.com sends mail out, his address will be user@2.domain.com right.

so a reply would go to 2.domain.com anyway.

but if the user gives out address user@1.domain.com then they would really be bouncing around two different email addresses

or does everyone use 1.domain.com as their outgoing server
 
Old 05-18-2003, 07:45 AM   #12
LinuxGod
LQ Newbie
 
Registered: Aug 2001
Location: Cave Mountain
Distribution: Redhat Only
Posts: 29

Original Poster
Rep: Reputation: 15
2.otherdomain.com is already up and running sending email as
otherdomain.com so relaying mail to it would not be a problem it would just pick it right up and send it to the mailbox.

But . . . 1.otherdomain.com is a postfix server and if it accepts mail postfix is the last destination, so I nee so type og reg expression or if statement to query the incoming recipients before it makes a decision.

Thanks
LinuXGoD
 
  


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
how to reduce swap space and reclaim the space grantm Linux - Newbie 7 08-16-2012 08:05 AM
notify user space application from the kernel space lordofring Linux - Software 2 06-22-2009 01:32 PM
Postfix send mail problem(In RH9, kernal 2.4.20, postfix 2.1.5) minor Linux - General 4 07-11-2005 10:12 PM
Not enough space for root directory on a drive with 50g free space??? auoq Linux - Newbie 1 10-13-2004 01:44 PM
can't start postfix ./postfix status error jules_fraser Linux - Software 3 12-06-2003 07:33 PM


All times are GMT -5. The time now is 04:48 AM.

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