difference between postuser and sharedprefix ?

Ken Murchison ken at oceana.com
Fri Oct 25 11:43:12 EDT 2002



Scott Russell wrote:
> 
> On Thu, Oct 24, 2002 at 10:09:17PM -0400, Ken Murchison wrote:
> > Quoting Scott Russell <lnxgeek at us.ibm.com>:
> > > > Check out the description of 'altnamespace' in the manpage or docs if my
> > > > explanation is too cryptic.
> > > >
> > >
> > > No, not to cryptic, just not clear? :) I've checked the man page so
> > > let me try to ask my question again.
> > >
> > > I have the following in my imapd.conf file:
> > >
> > >   configdirectory: /var/imap
> > >   partition-default: /var/spool/imap
> > >   altnamespace: yes
> > >   userprefix: user
> > >   postuser: share
> > >
> > > I created "testbox" using cyradm. This shows up on the partition as
> > > /var/spool/imap/testbox/.
> > >
> > > With my imapd.conf set as pasted here, (notice no shareprefix is set)
> > > mail sent to share+testbox at myhost.com does get delivered right.
> > >
> > > Now, given all that, I can, without changing the physical mailbox
> > > "testbox" change my imapd.conf to remove the postuser line and add
> > > shareprefix: user. After restarting cyrus imapd posting still works.
> >
> > Still using share+testbox at myhost.com ?
> 
> Correct. share+testbox at myhost.com works with _either_ shareprefix:
> share or postuser: share set. I haven't bothered to try and see what
> happens if I have them both set at the same time.
> 
> The MTA is postfix 1.1.7 on Red Hat 7.3. I do not have
> "recipient_delimiter = +" set so postfix passes the full share+testbox
> along to the LMTP socket.
> 
> Actually, that's not quite right. LMTP delivery is handled by
> spamcheck.py, part of spamassassin 1.31. spamcheck.py speaks LMTP to
> the cyrus LMTP socket.
> 
> > I think this is just coincidence, since sharedprefix has nothing to do with the
> > delivery address.  My guess it that your MTA might be translating the address
> > in some way.  What happens if you set sharedprefix to "foo", or postuser to
> > "foo"?
> 
> So sharedprefix is cosmetic only for the IMAP client side?

Yes.  When using altnamespace, we need to distinguish between your
personal "testbox" and a shared "testbox".  Since we've removed the
"INBOX." prefix for personal folders, we need to have one for shared
folders.  Maybe this will help:

internal mbox name        external name (altnamespace: 0)       
external name (altnamespace: 1)

user.scott.test           INBOX.test                             test
test                      test                                  
sharedprefix.test



> 
> I have postuser: share in my imapd.conf now so I'll try changing it to
> foo and see where it goes. Maybe postuser: picked up a default setting
> along the way that was never recorded in the man page?

By default, postuser is "", so that posting to a shared mailbox is done
via +testbox at ...

> And while I'm on the subject, is it wrong to create the shared mailbox
> as (cm testbox) or should I have done (cm share.testbox). Keep in mind
> that (cm testbox) is what I did and this seems to work (or at least
> get mail)

Admins ALWAYS use the internal namespace, so you don't use the
sharedprefix.  I believe this is documented.

Ken
-- 
Kenneth Murchison     Oceana Matrix Ltd.
Software Engineer     21 Princeton Place
716-662-8973 x26      Orchard Park, NY 14127
--PGP Public Key--    http://www.oceana.com/~ken/ksm.pgp




More information about the Info-cyrus mailing list