LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-01-2005, 03:45 AM   #1
maginotjr
Member
 
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661

Rep: Reputation: 34
Postifx and VirtualHost


Im running a server with virtual host, I have 2 domain in the same machine... but like I said I have 2 domains and want to know if I can configure postfix to accept email from 2 domains.... for eg:
user1@domain1.com email goes to user1
user1@domain2.com email goes to user1 two but accept the email recognizing that both are to user1 in the machine....


[ ]'s
 
Old 12-02-2005, 04:40 PM   #2
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
If I understand you correctly, you want mail to user1@domain1.com and user1@domain2.com to be delivered to local user user1. Assuming neither domain is mentioned in mydestination, your main.cf should contain this:
Quote:
virtual_alias_domains = domain1.com domain2.com
virtual_alias_maps = hash:/etc/postfix/virtual
Then, create /etc/postfix/virtual with the following entries:
Quote:
user1@domain1.com user1
user1@domain2.com user1
Then run
Code:
postmap /etc/postfix/virtual
postfix reload
Another possibility is to have both domains listed in mydestination, since you don't have a problem of username clashes. In that case you shouldn't set virtual_alias_domains or virtual_alias_maps.

Last edited by Berhanie; 12-05-2005 at 09:24 AM.
 
Old 12-05-2005, 03:11 AM   #3
maginotjr
Member
 
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661

Original Poster
Rep: Reputation: 34
you are right, this is exactly what I want... thanks!


regards
[ ]'s
 
Old 12-05-2005, 09:28 AM   #4
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
you're welcome.
(i corrected a typo in the virtual table entry. please have another look).
 
  


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
email being blocked by spam filters - New postifx setup newtommy Linux - Software 4 05-05-2005 04:03 AM
A postifx question mabs Linux - Software 0 10-21-2004 06:56 AM
postifx problem rnj Fedora 0 10-18-2004 03:54 AM
VirtualHost amdathlonboy Linux - Networking 2 06-22-2004 05:23 AM
Postifx denies certain user names?? cjpsparks Linux - Software 2 12-21-2003 09:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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