LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-02-2004, 06:11 PM   #1
Farthom
LQ Newbie
 
Registered: Mar 2004
Distribution: Gentoo Linux 2004.3
Posts: 4

Rep: Reputation: 0
How to make postfix accept mail from multiple domains


This should be an easy answer for anyone who knows the system well. I have 3 domains registered with dyndns.org and i have set up postfix on the machine they point to. ALL THREE domains point to the same machine. One of the domains is set in postfix's main.cf, and postfix WILL recieve mail to that domain. farthom@domain1.something.net However, when i send email to farthom@domain2.something.net the server rejects it, because it doesnt realize that domain2 and domain 3 are local. Is there some setting i can set, Masquarading or soemthing that rewrites *@domain2.something.net to domain1.something.net????? I hope this question makes sense.....
 
Old 12-02-2004, 06:16 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
Create your virtual domains by adding them to the virtual file in the /etc/postfix config directory.

Once you create or edit this file, run a command like this so it updates it to be readable by postfix:

cd /etc/postfix
postmap /etc/postfix/virtual <virtual

The contents of the file for virtual domains for mail will look something like this:

Code:
domain2.com VIRTUAL
user1@domain2.com             user1
user2@domain2.com             user2
Where the first line indicates the domain name and states that its a Virtual domain..

The second line is the email alias that points to the local user account, etc, kind of formatted like the aliases file.
 
Old 12-02-2004, 07:45 PM   #3
Farthom
LQ Newbie
 
Registered: Mar 2004
Distribution: Gentoo Linux 2004.3
Posts: 4

Original Poster
Rep: Reputation: 0
Thank you. I got it working now.
 
Old 09-14-2006, 05:56 AM   #4
joadoor
Member
 
Registered: Apr 2002
Location: Clevedon, UK
Distribution: SUSE 8.2, 9.2, 10.0 OSS
Posts: 57

Rep: Reputation: 15
all addresses

Hi,

This is exactly what I need to do, but I don't want to add about 150 names to this file and then maintain it.

Is there a way of getting postfix to automatically accept mail for 'user1@domain2.com' and treating it as though it was 'user1@domain1.com' (ie passing the email through to the correct mailbox on our Exchange server?)

TIA,

Andy
 
Old 09-14-2006, 11:13 AM   #5
joadoor
Member
 
Registered: Apr 2002
Location: Clevedon, UK
Distribution: SUSE 8.2, 9.2, 10.0 OSS
Posts: 57

Rep: Reputation: 15
Sorted!

Have managed to have a fiddle with Postfix and have found the solution.

In the virutal file you need the following line:

@domain2.com @domain1.com


That way, any email destined for anyuser@domain2.com will end up at anyuser@domain1.com

Might be simple, but I couldn't find anything specific in the man pages (or if its there, I didn't spot it)

Hope this helps someone else.

Andy
 
  


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 multiple domains & mailboxes fatum112 Linux - Software 0 11-21-2005 01:13 PM
Postfix won't accept mail from ONE client dontaylor2 Linux - Networking 5 11-10-2005 12:10 PM
Help getting Postfix to accept mail from anywhere nevarlen Linux - Networking 4 06-23-2005 05:53 AM
Postfix and multiple domains MasterC Linux - Networking 4 07-16-2003 01:19 PM
Postfix wil not accept external mail gruger Linux - Software 8 06-19-2003 02:57 PM


All times are GMT -5. The time now is 06:44 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