[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: zmailer & virtual domains

> >      I have the following question -- can I have some different mail
> > domains     in one UNIX-box with zmailer?  For example, I want to have
> > user1@domain1 and     user2@domain2 but user1@domain2 must be error address.
> There is exactly one problem: how to tell Zmailer which addresses are
> valid/where to put their mail.  Here we are running Zmailer compiled with
> replacement getpwnam() function that actually returns "struct passwd"
> information from a database rather than passwd, and is aware of domains.
> Then, we have a special channel "virt" that is sililar to "local" but
> invokes mailbox agent with "-d /path/to/vdoms/$host" option.  Essentially,
> that's all.  You also need a patched POP/IMAP server that is aware of
> domains...  I've patched UW imapd.

	I have one idea (may be stupid :-)) ) -- we use Cyrus POP/IMAP server
   and patched cf/crossbar.cf.  When crossbar() function rewrite recipient's
   address it looks in my special database (like aliases but we use as key 
   user part of address and cyrus-mailbox name as value).  So, we can use
   several files for every virtual domain.

	What do you think about this?

P.S.  One disadvantage of this idea is that we can't have user1@domain1 and
      user1@domain2 address without POP/IMAP server patches.

	CU, Victor Gamov