Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Postfix: local and virtual users on the same domain?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
loke_71
n00b
n00b


Joined: 05 Oct 2004
Posts: 12

PostPosted: Wed Mar 02, 2005 10:18 am    Post subject: Postfix: local and virtual users on the same domain? Reply with quote

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
View user's profile Send private message
j-m
Retired Dev
Retired Dev


Joined: 31 Oct 2004
Posts: 975

PostPosted: Wed Mar 02, 2005 12:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
sf_alpha
Tux's lil' helper
Tux's lil' helper


Joined: 19 Sep 2002
Posts: 136
Location: Bangkok, TH

PostPosted: Wed Mar 02, 2005 1:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Wed Mar 02, 2005 6:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum