Re: Syntax for mailbox_default_options

2018-05-22 Thread Nels Lindquist
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 2018/04/12 10:09 PM, ellie timoney wrote:

>> On Fri, Apr 13, 2018, at 1:21 AM, Nels Lindquist wrote: The man
>> page for imapd.conf has this to say regarding 
>> "mailbox_default_options":
>> 
 Default “options” field for the mailbox on create. You’ll
 want to know what you’re doing before setting this, but it
 can apply some default annotations like duplicate supression
>> Well, I don't know what I'm doing and I'm not finding anything in
>> the documentation (or Google) to help.
>> 
>> What's the syntax for this directive?

> I believe it's an integer bitmask of the OPT_* values that are 
> defined in imap/mailbox.h in the source.
> 
> The sparse documentation suggests it's for developer, rather than 
> normal administrator use, maybe for rigging up tests? It's included
> in the imapd.conf man page because that man page is autogenerated
> from the code that processes the options.
> 
> Unless you've got something in particular you're trying to do, I'd 
> probably just leave it alone. :)

Okay, I do need it.  I have a legacy server with Cyrus IMAPD 2.3.x
installed, and I need to enable the CONDSTORE flag by default on all
newly created mailboxes/subfolders.

- From imap/mailbox.h:

#define OPT_POP3_NEW_UIDL (1<<0)
#define OPT_IMAP_CONDSTORE (1<<1)
#define OPT_IMAP_SHAREDSEEN (1<<2)
#define OPT_IMAP_DUPDELIVER (1<<3)

And also:

#define OFFSET_MAILBOX_OPTIONS 60

So given that POP3_NEW_UIDL appears to be on by default and the others
are all off, would the syntax be:

(Offset int 60 + (1 << 1 = int 2) + (1 << 0 = int 1) = int 63)

mailbox_default_options: 63

Am I on the right track?

Nels Lindquist 
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iEYEARECAAYFAlsEW7IACgkQh6z5POoOLgQPvQCeOqvesjl/sPGPbSs/xQJp9FsT
cMsAni5oI3/7f43JE31k1wJCShc9cQyD
=pGRz
-END PGP SIGNATURE-

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

IMAPD Missing quota root

2018-05-22 Thread James B. Byrne via Info-cyrus
We have a problem with quota settings on a new v3.0.5 service. The
mailboxes were transferred via rsync from oldserver:/var/spool/imap/
to newserver:/var/spool/imap

The mailboxes.db was unloaded on the old server using mboxelist,
transferred to the new server, and then loaded into an empty
mailboxes.db.

We ran 'reconstruct -f -r -G -V max user/*'.  All this when well. 
However, we cannot re-establish a quota root for the transferred
mailboxes.  When we try to run quota from the command line then we see
this:

sudo -u cyrus /usr/local/cyrus/sbin/quota -f user/*
   Quota   % Used Used Resource Root

If we just run it to get a list of the user quotas then we the same
thing:

sudo -u cyrus /usr/local/cyrus/sbin/quota
   Quota   % Used Used Resource Root

And if we run it to rebuild the quotas for a specific user then we
first see this:

# sudo -u cyrus /usr/local/cyrus/sbin/quota -f user.x
user.x: quota root user.x --> (none)
user.x.Bayshore_Hobbies: quota root user.x --> (none)
user.x.Drafts: quota root user.x --> (none)
user.x.HLL: quota root user.x --> (none)
.  .  .

But if we rerun the same command after seeing the above then we this
instead:

# sudo -u cyrus /usr/local/cyrus/sbin/quota -f user.x
   Quota   % Used Used Resource Root

In maillog we see things like this:

May 22 12:03:43 inet17 CYRUS/lmtpunix[85335]: LOSTQUOTA: unable to
record change of 1639 bytes and 1 messages in quota user.x: Quota root
does not exist
May 22 12:03:43 inet17 CYRUS/lmtpunix[85335]: Delivered:
<20180522120340.067...@imap.internal.harte-lyne.ca> to mailbox:
user.x.delivery
May 22 12:03:43 inet17 CYRUS/lmtpunix[85335]: USAGE x user: 0.010593
sys: 0.010593

and this:

May 22 04:14:00 inet17 CYRUS/ipurge[68591]: Expunged 33 messages from
user.y.Sent
May 22 04:14:00 inet17 CYRUS/ipurge[68591]: LOSTQUOTA: unable to
record change of -1634898 bytes and -33 messages in quota user.y:
Quota root does not exist.

May 22 04:10:00 inet17 CYRUS/ipurge[63950]: Expunged 252 messages from
user.x.Trash
May 22 04:10:00 inet17 CYRUS/ipurge[63950]: LOSTQUOTA: unable to
record change of -22899753 bytes and -252 messages in quota user.x:
Quota root does not exist


On the old (v2.3) service we have no such problems.

How do I transfer quotas?  How do I create the missing quota roots?


-- 
***  e-Mail is NOT a SECURE channel  ***
Do NOT transmit sensitive data via e-Mail
 Do NOT open attachments nor follow links sent by e-Mail

James B. Byrnemailto:byrn...@harte-lyne.ca
Harte & Lyne Limited  http://www.harte-lyne.ca
9 Brockley Drive  vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada  L8E 3C3


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus