On 05-11-13 18:34, Matt . wrote:
> Hi All,
>
> I want to prevent people removing messages from my imap server, is this
> possible ?
>
> In a webclient I can just remove the buttons but from a remote IMAP
> client I'm kinda stuck.
>
> It may be possible to move messages to the trash, but I wonder if
> clients like an iPhone or so just have a "empty trash" command instead
> of "delete * from folder" command idea.
>
> It would be great if I was able to only move messages and not delete
> them in any way.
IMAP deletion often entails one of two strategies:
set the '\deleted' flag on messages (strike-through in outlook) and
later expunge the mailbox.
'move' the message to Trash. This is the same as the first one, but the
message is first copied to Trash. IMAP doesn't support direct moving.
Not with some non-standard extension that is.
So you have several choices:
1. set all mailboxes read-only; Yuk: they can't set any flags, not just
the \deleted one. This involves the dbmail_mailboxes.permission field
where 1 means READ, and 2 means READWRITE (default)
2. never run dbmail-util -pd: messages won't be visible to IMAP after
setting the \deleted flag and running expunge, but they are still in the
database. You can then set the status field back to '1' where status >
1, and clear the deleted_flag field using a cron job.
3. setup ACLs for all mailboxes where they can set all flags except the
\deleted flag. You could even setup a trigger where you add a row to
dbmail_acl whenever a row is added to dbmail_mailboxes.
I think the last one is what you need.
--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, github, linkedin
* Premium Hosting Services and Web Application Consultancy *
www.nfg.nl/[email protected]/+31.85.877.99.97
________________________________________________________________
_______________________________________________
DBmail mailing list
[email protected]
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail