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.....
|
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: 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. |
Thank you. I got it working now.
|
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 |
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 |
All times are GMT -5. The time now is 07:24 AM. |