Discussion:
Syntax for mailbox_default_options
Nels Lindquist
2018-04-12 15:21:25 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The man page for imapd.conf has this to say regarding
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?

Thanks,

Nels Lindquist <***@maei.ca>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlrPeXUACgkQh6z5POoOLgSseQCeMf84dZYsch4TEgyh1yp/nFxK
jNkAnjkmipQpX840srzkAUhxOd0vYW2z
=q9eN
-----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/ma
ellie timoney
2018-04-13 04:09:46 UTC
Permalink
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. :)

Cheers,

ellie
Post by Nels Lindquist
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The man page for imapd.conf has this to say regarding
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?
Thanks,
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iEYEARECAAYFAlrPeXUACgkQh6z5POoOLgSseQCeMf84dZYsch4TEgyh1yp/nFxK
jNkAnjkmipQpX840srzkAUhxOd0vYW2z
=q9eN
-----END PGP SIGNATURE-----
----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
h
Nels Lindquist
2018-05-22 18:04:34 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by ellie timoney
On Fri, Apr 13, 2018, at 1:21 AM, Nels Lindquist wrote: The man
page for imapd.conf has this to say regarding
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 <***@maei.ca>
-----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
Nels Lindquist
2018-05-25 16:40:29 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Nels Lindquist
Post by ellie timoney
On Fri, Apr 13, 2018, at 1:21 AM, Nels Lindquist wrote: The
man page for imapd.conf has this to say regarding
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.
#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)
#define OFFSET_MAILBOX_OPTIONS 60
So given that POP3_NEW_UIDL appears to be on by default and the
(Offset int 60 + (1 << 1 = int 2) + (1 << 0 = int 1) = int 63)
mailbox_default_options: 63
Am I on the right track?
Okay, I figured it out in a test environment.

The offset is a red herring and shouldn't be included, so the
following does what I need:

mailbox_default_options: 3


- ----
Nels Lindquist <***@maei.ca>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlsIPH0ACgkQh6z5POoOLgQetQCdH35APGYoK9BtIB455amFfg/3
hUEAn2APWYfUif6EF3uSH0tYFr9yGUzn
=R1dx
-----END PGP SIGNATURE-----
----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https:/

Loading...