Thanks again.  I understand my options now.

But, would you consider adding support for per user seen_flag for #Public 
mailboxes?

I’d be willing to “sponsor” the feature, if that would help get it implemented.

One way to implement this feature would be to add a table that tracks the 
messages that the user has read in the #Public mailbox (userid, messageid 
columns).  If this table has a row in it for the message, the seen_flag would 
be returned as 1 (for all queries of the seen_flag for the messageid by the 
user) and 0 if no row in the table.

When the user reads a public message, a row would be inserted into this table 
(userid/messageid pair).  When the user marks the message as unread, any row in 
the table would be deleted.  Also, the rows in the table for a messageid would 
need to be deleted when the messageid is deleted. 

I’m not sure how you would need to handle the seen_flag on the public mailbox 
row.  You might have to have a similar table for public mailboxes (userid, 
mailboxid) to track the seen_flag per user.  Basically, all queries to retrieve 
the seen_flag (either per message or per mailbox) need to use the per user 
tables for public mailboxes/messages.

Anyway, I’m pretty sure the RFC doesn’t talk about per user seen_flags, but I 
doubt that it prohibits you from implementing this.

Let me know if you are willing to add this feature if I pay for your time in 
adding it.

My plan for now is to modify RoundCube to track per user public seen_flags with 
the table in the RoundCube db, but this doesn’t solve the problem for users 
using their own IMAP clients to access the public mailbox (something I’m not 
going to allow initially and may be a “premium” feature for my users).

Kevin

On Apr 13, 2014, at 12:36 PM, Paul J Stevens <[email protected]> wrote:

> 
> 
> On 13-04-14 17:48, KT Walrus wrote:
>> Thanks.  What should my ACL row look like (what flags should be
>> set)?
> 
> I would have to re-read the RFC I mentioned. I'm guessing you can do
> that yourself.
> 
>> I want the public mailbox to be read-only.  Right now, the only ACL
>> flags I have set are lookup_flag and read_flag.
> 
> looking at:
> 
> https://tools.ietf.org/html/rfc4314#page-13
> 
> that would sound about right.
> 
>> If the per message flags are not per user, then I think I would like
>> all messages in the public mailbox to have the seen_flag set.  How
>> can I make sure the seen_flag is set?
>> 
>> I’m delivering public messages using this command:
>> 
>> /usr/sbin/dbmail-deliver -u __public__ -M “test_shared" <test.mail
>> 
>> Should I be using IMAP to store and set the seen_flag instead of
>> dbmail-deliver?  Or, use IMAP to only set the seen_flag?
> 
> You can grant a special user the 's' and 'w' rights, and schedule that user 
> to connect and update the flags by issuing:
> 
> nc host imap
> x login setflagsuser setflagsuserpassword
> x select #Public/mailbox
> x store 1:* +flags.silent \seen
> x store 1:* -flags.silent \recent
> x logout
> 
>> Or, should I just have a job run after delivery to set the seen_flag
>> in the db for all public mailboxes and public messages?
> >
>> Also, should I have the recent_flag cleared too?
> 
> That is probably much faster. You might even use a trigger to do that.
> 
> 
> -- 
> ________________________________________________________________
> Paul J Stevens       pjstevns @ gmail, twitter, github, linkedin
>           www.nfg.nl/[email protected]/+31.85.877.99.97
> _______________________________________________
> DBmail mailing list
> [email protected]
> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail

_______________________________________________
DBmail mailing list
[email protected]
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail

Reply via email to