replcomps replgroupcomps scan.MMDDYY scan.YYYYMMDD \
scan.nmh scan.mailx scan.nomime scan.size scan.time \
scan.timely scan.unseen scan.meillo scan.default \
- mhn.defaults
+ mhn.defaults repllistcomps
# ========= DEPENDENCIES FOR BUILDING ==========
--- /dev/null
+%; repllistcomps
+%;
+%; form (components) file for mailing list replies
+%;
+%; Check the following headers to create reply addresses.
+%;
+%; To: List-Post
+%;
+%; OR
+%;
+%; To: Mail-Followup-To
+%;
+%; OR
+%;
+%; To: Mail-Reply-To (or)
+%; Reply-To (or)
+%; From (or)
+%; Sender (or)
+%; Return-Path
+%;
+%; AND
+%;
+%; Cc: To (and)
+%; Cc (and)
+%; personal address
+%;
+%(lit)%(formataddr(unmailto{mail-followup-to}))\
+%<(nonnull)%(void(width))%(void(decode))%(putaddr To: )\n\
+%|\
+%(lit)%(formataddr{mail-followup-to})\
+%<(nonnull)%(void(width))%(void(decode))%(putaddr To: )\n\
+%|\
+%(lit)%(formataddr %<{mail-reply-to}%?{reply-to}%?{from}%?{sender}%?{return-path}%>)\
+%<(nonnull)%(void(width))%(void(decode))%(putaddr To: )\n%>\
+%(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(me))\
+%<(nonnull)%(void(width))%(void(decode))%(putaddr Cc: )\n%>\
+%>\
+%>\
+%;
+Fcc: +sent
+Subject: %<{subject}Re: %(putstr(trim(decode{subject})))%>
+%;
+%; Make References: and In-reply-to: fields for threading.
+%; Use (trim) to eat trailing whitespace.
+%;
+%<{message-id}In-reply-to: %{message-id}\n%>\
+%<{message-id}References: \
+%<{references}%(trim{references})%(putstr) %>\
+%(trim{message-id})%(putstr)\n%>\
+Comments: In-reply-to \
+%<{from}%(void{from})%?(void{apparently-from})%|%(void{sender})%>\
+%(putstr(trim(decode)))\n\
+ message dated "%<(nodate{date})%{date}%|%(tws{date})%>."
+--------
+[%4(year{date})-%02(mon{date})-%02(mday{date}) \
+%02(hour{date}):%02(min{date})] %(decode{from})
+>
#define FT_V_MATCH 87 /* V = 1 if "str" contains literal */
#define FT_V_AMATCH 88 /* V = 1 if "str" starts with literal */
+#define FT_LS_UNMAILTO 89 /* remove "mailto:" */
+
#define IF_FUNCS FT_S_NULL /* start of "if" functions */
decode expr string decode \fIstr\fR as RFC-2047 (MIME-encoded)
component and print it
unquote expr string remove RFC-2822 quotes from \fIstr\fR
+unmailto expr string remove `mailto:' and < > from \fIstr\fR
trim expr trim trailing white-space from \fIstr\fR
putstr expr print \fIstr\fR
putstrf expr print \fIstr\fR in a fixed width
{ "mymbox", TF_COMP, FT_LV_COMPFLAG, FT_MYMBOX, TFL_PUTN },
{ "unquote", TF_EXPR, FT_LS_UNQUOTE, 0, TFL_PUTS},
+ { "unmailto", TF_EXPR, FT_LS_UNMAILTO, 0, TFL_PUTS},
{ NULL, 0, 0, 0, 0 }
};
}
break;
+ case FT_LS_UNMAILTO:
+ if (!str) {
+ break;
+ }
+ str = trim(str);
+ if (*str == '<' && str[strlen(str)-1] == '>') {
+ str++;
+ str[strlen(str)-1] = '\0';
+ }
+ if (strncmp("mailto:", str, 7)==0) {
+ str += 7;
+ }
+ break;
+
}
fmt++;
}
case FT_LV_DAT:
printf(", value dat[%d]", fmt->f_value);
break;
+
+ case FT_LS_UNMAILTO:
+ break;
}
putchar('\n');
}
case FT_V_GT: return("V_GT");
case FT_V_MATCH: return("V_MATCH");
case FT_V_AMATCH: return("V_AMATCH");
+ case FT_LS_UNMAILTO: return("LS_UNMAILTO");
default:
printf(buf, "/* ??? #%d */", t);
return(buf);