user/dev discussion of public-inbox itself
 help / color / mirror / code / 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

user/dev discussion of public-inbox itself

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/meta
	git clone --mirror http://czquwvybam4bgbro.onion/meta
	git clone --mirror http://hjrcffqmbrq6wope.onion/meta
	git clone --mirror http://ou63pmih66umazou.onion/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://public-inbox.org/meta \
		meta@public-inbox.org
	public-inbox-index meta

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.mail.public-inbox.meta
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.mail.public-inbox.meta
	nntp://ie5yzdi7fg72h7s4sdcztq5evakq23rdt33mfyfcddc5u3ndnw24ogqd.onion/inbox.comp.mail.public-inbox.meta
	nntp://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/inbox.comp.mail.public-inbox.meta
	nntp://news.gmane.io/gmane.mail.public-inbox.general
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

	https://80x24.org/public-inbox.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git