LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Postifx and VirtualHost (https://www.linuxquestions.org/questions/slackware-14/postifx-and-virtualhost-388194/)

maginotjr 12-01-2005 03:45 AM

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

Berhanie 12-02-2005 04:40 PM

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.

maginotjr 12-05-2005 03:11 AM

you are right, this is exactly what I want... thanks!


regards
[ ]'s

Berhanie 12-05-2005 09:28 AM

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


All times are GMT -5. The time now is 02:03 AM.