View previous topic :: View next topic |
Author |
Message |
loke_71 n00b
Joined: 05 Oct 2004 Posts: 12
|
Posted: Wed Mar 02, 2005 10:18 am Post subject: Postfix: local and virtual users on the same domain? |
|
|
Hi,
I've set up postfix for virtual mailhosting.
following the Virtual Mailhosting System with Postfix Guide
http://www.gentoo.org/doc/en/virt-mail-howto.xml
Now, I would like to serve both local and virtual users on the same domain, is this possible
The transport table do not accept duplicate domain listings, so is there a way around this?
Thanks |
|
Back to top |
|
|
j-m Retired Dev
Joined: 31 Oct 2004 Posts: 975
|
Posted: Wed Mar 02, 2005 12:51 pm Post subject: |
|
|
This is not possible. But local users can get their mail with virtual transport. But you need to add them to required maps/db/etc... I am using MySQL database for this. |
|
Back to top |
|
|
sf_alpha Tux's lil' helper
Joined: 19 Sep 2002 Posts: 136 Location: Bangkok, TH
|
Posted: Wed Mar 02, 2005 1:22 pm Post subject: |
|
|
It cannot mixed. You should add mail account for local users to database (Virtual Domains). Don't remember to remove domain from mydestination. _________________ Gentoo Mirrors in Thailand (and AP)
http://gentoo.in.th |
|
Back to top |
|
|
kashani Advocate
Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Wed Mar 02, 2005 6:04 pm Post subject: |
|
|
You've got two choices
1. Add local accounts into mysql.
This will be a pain in the ass since you won't be able to sync passwords between the local accounts and virtual setting. The idea though is that you make an entry in your users table that points mail to the local user say /home/$user/.maildir/ instead of /var/vmail/$domain/$user/.maildir/ As long as you keep everything straight it should work.
2. play the alias game
This is actually a much better solution. We're setting the hostname as a local domain so we can send things that come into the virtual table to local accounts.
Code: |
1 hostname.domain1.com local:
2 domain1.com virtual:
3 domain2.com virtual:
|
Now set some aliases in your virtual table
Code: |
id email destination
1 bob@domain1.com bob@hostname.domain1.com
2 sid@domain1.com sid@hostname.domain1.com
2 bob@domain2.com bob@histname.domain1.com
|
By doing this you can have local users get mail from any virtual domain as long as you add an alias for them.
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
|
|