unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] lei: maildir: handle "forwarded" keyword as "P"
@ 2021-04-01 10:12 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2021-04-01 10:12 UTC (permalink / raw)
  To: meta

mbox and IMAP seem to have no way of describing this keyword.
but Maildir does with the "P" flagged (for "passed").
---
 lib/PublicInbox/LeiToMail.pm  | 3 ++-
 lib/PublicInbox/MdirReader.pm | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/PublicInbox/LeiToMail.pm b/lib/PublicInbox/LeiToMail.pm
index 4c33c752..da633da4 100644
--- a/lib/PublicInbox/LeiToMail.pm
+++ b/lib/PublicInbox/LeiToMail.pm
@@ -27,8 +27,9 @@ $PublicInbox::GitAsyncCat::GCF2C = 0;
 my %kw2char = ( # Maildir characters
 	draft => 'D',
 	flagged => 'F',
+	forwarded => 'P', # passed
 	answered => 'R',
-	seen => 'S'
+	seen => 'S',
 );
 
 my %kw2status = (
diff --git a/lib/PublicInbox/MdirReader.pm b/lib/PublicInbox/MdirReader.pm
index 30e6f8ad..1685e4d8 100644
--- a/lib/PublicInbox/MdirReader.pm
+++ b/lib/PublicInbox/MdirReader.pm
@@ -37,7 +37,8 @@ sub maildir_each_file ($$;@) {
 	}
 }
 
-my %c2kw = ('D' => 'draft', F => 'flagged', R => 'answered', S => 'seen');
+my %c2kw = ('D' => 'draft', F => 'flagged', P => 'forwarded',
+	R => 'answered', S => 'seen');
 
 sub maildir_each_eml ($$;@) {
 	my ($dir, $cb, @arg) = @_;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-01 10:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01 10:12 [PATCH] lei: maildir: handle "forwarded" keyword as "P" Eric Wong

unofficial mirror of meta@public-inbox.org

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/meta

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 meta meta/ https://yhetil.org/meta \
		meta@public-inbox.org
	public-inbox-index meta

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.mail.public-inbox.meta
	nntp://news.public-inbox.org/inbox.mail.public-inbox.meta
	nntp://news.gmane.io/gmane.mail.public-inbox.general


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git