From 660b5829b166af80696ac983fedc3a8257f1c9f8 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Mon, 27 Apr 2020 12:52:09 +0200 Subject: sfeed_mbox: remove prefix in subject The prefix in the subject can be too much/redundant if custom labels are used in the mail client for example. Filtering or custom labels can be made using the X-Feedname header. For mutt it can be useful to use the header X-Label and use the %y format specified to indicate the label. The index_format is described in the muttrc man page. An example: set index_format = "%4C %Z %[%a, %b %d %H:%M] %?y?%-15.15y ?%-15.15L (%?l?%4l&%4c?) %s" Other programs have similar headers: Dovecat has "X-Keywords" and Thunderbird "X-Mozilla-Keys". --- sfeed_mbox.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sfeed_mbox.c b/sfeed_mbox.c index 587429b..b1224c6 100644 --- a/sfeed_mbox.c +++ b/sfeed_mbox.c @@ -49,10 +49,7 @@ printfeed(FILE *fp, const char *feedname) printf("Date: %s\n", timebuf); printf("From: %s \n", fields[FieldAuthor][0] ? fields[FieldAuthor] : "unknown"); printf("To: %s <%s@%s>\n", user, user, host); - if (feedname[0]) - printf("Subject: [%s] %s\n", feedname, fields[FieldTitle]); - else - printf("Subject: %s\n", fields[FieldTitle]); + printf("Subject: %s\n", fields[FieldTitle]); printf("Message-ID: <%s%s%lu@%s>\n", fields[FieldUnixTimestamp], fields[FieldUnixTimestamp][0] ? "." : "", -- cgit v1.2.3