thx for the great tool, I setted up some mailing lists with it.
I developed my own webmailer
(http://ftp.ee.fhm.edu/pub/unix/wxwmail-0.3beta1.tar.gz), because
I wanted to have a more flexible webmailer.
I think it is a good enhancement for hypermail usage.
If you like it, feel free to name it on your site ;-)
For me there were also some problems with hypermail, which are now handled by the attached patch (can also be obtained at: ftp://ftp.ee.fhm.edu/pub/unix/patches-hypermail-2b30.diff).
Please have a look at them, maybe they are of interest for your new release:
file_created = MAKE_FILE; /* please make one */
}
}
+
else if (!strncasecmp(head->line, "Content-Base:", 13)) {
+
char *ptr = head->line + 13;
+ content=CONTENT_IGNORE;
+
/* we must make sure this is not parsed more times
+
than this */
+
head->parsedheader = TRUE;
+ }
else if (!strncasecmp(head->line, "Content-Type:", 13)) {
char *ptr = head->line + 13;
else
fname = FILE_SUFFIXER;
-
binname = maprintf("%s%c%.2d-%s",
+
binname = maprintf("%s%c%05d-%s",
att_dir, PATH_SEPARATOR,
att_counter, fname);
/* _at_@ move this one up */
if (set_mailcommand) {
if (set_hmail) {
-
ptr = makemailcommand("mailto:$TO", set_hmail, "", "");
-
fprintf(fp, "<th><a href=\"%s\">%s</a></th>\n",
+
ptr = makemailcommand(set_mailcommand, set_hmail, "", "");
+ if (strcmp(ptr, "NONE")!=0)
+
fprintf(fp, "<th><a href=\"%s\">%s</a></th>\n",
ptr ? ptr : "", lang[MSG_NEW_MESSAGE]);
if (ptr)
free(ptr);
=================
==adding NONE as value for hm_mailcommand, so "New Message" will not be ptr = makemailcommand(set_mailcommand, set_hmail,
currentid, cursub);
-
fprintf(fp, "<th><a href=\"%s\">%s</a></th>\n", +
if (strcmp(ptr, "NONE")!=0)
+
fprintf(fp, "<th><a href=\"%s\">%s</a></th>\n",
ptr ? ptr : "", lang[MSG_REPLY]); if (ptr) free(ptr);==adding NONE as value for hm_mailcommand, so "New Message" will not be
=================
}
else {
if (inheader) {
+ insig=0;
if (set_showhtml) {
if (pre) {
fprintf(fp, "</pre>\n");
=================
==that's the most important bugfix:
if (!strcmp(email->name, email->emailaddr)) {
if (use_mailcommand) {
-
ptr = makemailcommand(set_mailcommand,
+
ptr = makemailcommand(set_bodymailcommand,
email->emailaddr,
email->msgid, email->subject);
fprintf(fp, "<strong>From:</strong> <a href=\"%s\">", ptr ? ptr : "");
_at_@ -768,8 +771,8 @@
fprintf(fp, "<em>%s</em><br>\n", email->name);
}
else {
-
if (use_mailcommand) {
-
ptr = makemailcommand(set_mailcommand,
+
if (use_mailcommand && strcmp(email->emailaddr,"(no email)")!=0) {
+
ptr = makemailcommand(set_bodymailcommand,
email->emailaddr,
email->msgid, email->subject);
fprintf(fp, "<strong>From:</strong> %s (<a href=\"%s\">",
_at_@ -779,9 +782,12 @@
fprintf(fp, "<em>%s</em></a>)<br>\n", email->emailaddr);
}
else
+
{
fprintf(fp,
"<strong>From:</strong> %s (<em>%s</em>)<br>\n",
-
email->name, email->emailaddr);
+
email->name,
+
(strcmp(email->emailaddr,"(no email)")!=0) ? email->emailaddr : "no email");
+
}
}
fprintf(fp, "<strong>Date:</strong> %s\n<p>\n",
getdatestr(email->date));
=================
==if "(no email)" was passed, so don't make this entry clickable!
char *set_mailcommand;
+char *set_bodymailcommand;
char *set_mailto;
char *set_hmail;
char *set_domainaddr;
_at_@ -219,6 +220,13 @@
"# This is an octal number representing the file permissions\n"
"# that new files are set to when they are created.\n"},
+ {"bodymailcommand", &set_bodymailcommand, MAILCOMMAND, CFG_STRING,
+ "# This specifies the mail command to use when converting\n"
+ "# email addresses to links. The variables $TO, $SUBJECT,\n"
+ "# and $ID can be used in constructing the command string.\n"
+ "# This command is used inside the mail bodies and in the\n"
+ "# From: line.\n"},
+
{"mailcommand", &set_mailcommand, MAILCOMMAND, CFG_STRING,
"# This specifies the mail command to use when converting\n"
"# email addresses to links. The variables $TO, $SUBJECT,\n"
_at_@ -622,6 +630,7 @@
printf("set_dateformat = %s\n",set_dateformat ? set_dateformat :
"Not set");
printf("set_stripsubject = %s\n",set_stripsubject ?
set_stripsubject : "Not set");
printf("set_mailcommand = %s\n",set_mailcommand ? set_mailcommand
: "Not set");
printf("set_mailto = %s\n",set_mailto ? set_mailto : "Not set");
printf("set_hmail = %s\n",set_hmail ? set_hmail : "Not set");
printf("set_domainaddr = %s\n",set_domainaddr ? set_domainaddr :
"Not set");
--- hypermail-2b30/src/setup.h Thu Jun 8 00:14:25 2000
+++ hypermail-2b30/src/setup.h Sun Jan 28 16:05:56 2001
_at_@ -73,6 +73,7 @@
extern char *set_mailcommand;
+extern char *set_bodymailcommand;
extern char *set_mailto; extern char *set_hmail; extern char *set_domainaddr;==another enhancement! [;-)]
=================
/* remade to deal with any-length strings */
- tmpsubject = maprintf("%s%s", (hasre) ? "" : "Re: ", convsubj);
+ /* tmpsubject = maprintf("%s%s", (hasre) ? "" : "Re: ", (convsubj)
? convsubj : ""); */
+ tmpsubject = maprintf("%s%s", (convsubj && !hasre) ? "Re: " : "",
(convsubj) ? convsubj : "");
if ((cp = strrchr(email, ' ')) != NULL) *cp = '\0'; _at_@ -587,7 +587,7 @@ newcmd2 = replace(newcmd, "$ID", id); free(newcmd);
-
newcmd = replace(newcmd2, "$SUBJECT", tmpsubject);
+
newcmd = replace(newcmd2, "$SUBJECT", (tmpsubject) ? tmpsubject : "");
free(newcmd2);
newcmd2 = replacechar(newcmd, '%', "%25"); _at_@ -602,7 +602,7 @@
newcmd = newcmd2; /* this is the new string */
free(tmpsubject);
- }
+
free(convsubj);
return newcmd;
ptr-email, email, at, mailbuff);
if (valid_root_domain(mailaddr)) {
-
char *mailcmd = makemailcommand(set_mailcommand,
+
char *mailcmd = makemailcommand(set_bodymailcommand,
mailaddr, mid,
msubject);
msnprintf(tempbuff, sizeof(tempbuff),
=================
Ciao
Walter
-- -- oohhh sveglia.... il mondo e' ammalato, ma x colpa di chi......... (Zucchero) :-------W. Tasin, FB 04, FHM-------------------PGP-KeyID:0x7961A645----------: <Key-Fingerprint: 1610 835F 0080 32F4 6140 6CF7 A7D0 44CD 7961A645> <http://wwwkeys.pgp.net:11371/pks/lookup?op=index&search=0x7961A645&fingerprint=on>Received on Wed 14 Feb 2001 06:06:30 PM GMT
- application/octet-stream attachment: patches-hypermail-2b30.diff
This archive was generated by hypermail 2.3.0 : Sat 13 Mar 2010 03:46:12 AM GMT GMT