This saves them from bulk operations on threads and tagged messages. To
remove a flagged message, first unflag it.
if (bf)
{
- if (!h->deleted && !ctx->readonly)
+ if (!h->deleted && !ctx->readonly
+ && (!h->flagged || !option(OPTFLAGSAFE)))
{
h->deleted = 1;
update = 1;
** signed.
** (PGP only)
*/
+ { "flag_safe", DT_BOOL, R_NONE, OPTFLAGSAFE, 0 },
+ /*
+ ** .pp
+ ** If set, flagged messages cannot be deleted.
+ */
{ "folder", DT_PATH, R_NONE, UL &Maildir, UL "~/Mail" },
/*
** .pp
break;
case 'T': /* trashed */
- h->trash = 1;
- h->deleted = 1;
+ if (!h->flagged || !option(OPTFLAGSAFE))
+ {
+ h->trash = 1;
+ h->deleted = 1;
+ }
break;
default:
OPTENVFROM,
OPTFASTREPLY,
OPTFCCCLEAR,
+ OPTFLAGSAFE,
OPTFOLLOWUPTO,
OPTFORCENAME,
OPTFORWDECODE,