Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shared and Separate domains with Cyrus separate message store

Status
Not open for further replies.

bradphelps

Technical User
Jan 22, 2006
1
US
I am using postfix with a cyrus for a separate message store. I want to have three domains which are shared in which an email to user1 at any of those shared domains go to user1. Then I also need to host some additional domains which are separate so that an email to user1 at those domains are considered separate people. I think I may have it working but it seems like a real hack. I am wanting to know the best and most elegant way to set this up. Thanks for your help.

Thanks.
 
The second is done with virtual domains and is pretty simple. You have to have some external authentication for cyrus to handle username overlaps, so on my system your email address is user@example.com and you log in as user.example.com so different domains can have the same users.

The first I've only done via mysql, but I'll tell you the idea. Postfix looks up the final destination via mysql using a query:
Code:
select mailbox 
  from users 
 where username = 'user' 
   and domainname = 'example.com' 
 union 
select mailbox 
  from users, aliases 
 where users.domainname = aliases.domainname
   and username = 'user' 
   and alias = 'domainname'
There's a way to do it with virtual hosts in the postfix config files, it's in the man page on 'virtuals' I'm pretty sure.
 
Code:
 and alias = 'domainname'
should read:
Code:
 and alias = 'example.com'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top