processed = 1;
}
+ else if (!strcasecmp(key, "List-ID")) {
+ if (msg->cm_fields['L'] == NULL)
+ msg->cm_fields['L'] = strdup(value);
+ processed = 1;
+ }
+
else if (!strcasecmp(key, "To")) {
if (msg->cm_fields['R'] == NULL)
msg->cm_fields['R'] = strdup(value);
msg->cm_fields['F'] = strdup(buf);
msg->cm_fields['R'] = strdup(buf);
+ /* Set the 'List-ID' header */
+ msg->cm_fields['L'] = malloc(1024);
+ snprintf(msg->cm_fields['L'], 1024,
+ "%s <%ld.list-id.%s>",
+ CC->room.QRname,
+ CC->room.QRnumber,
+ config.c_fqdn
+ );
+
/*
* Go fetch the contents of the digest
*/
msg = CtdlFetchMessage(msgnum, 1);
if (msg != NULL) {
+ /* Set the 'List-ID' header */
+ if (msg->cm_fields['L'] != NULL) {
+ free(msg->cm_fields['L']);
+ }
+ msg->cm_fields['L'] = malloc(1024);
+ snprintf(msg->cm_fields['L'], 1024,
+ "%s <%ld.list-id.%s>",
+ CC->room.QRname,
+ CC->room.QRnumber,
+ config.c_fqdn
+ );
+
/* Prepend "[List name]" to the subject */
if (msg->cm_fields['U'] == NULL) {
msg->cm_fields['U'] = strdup("(no subject)");
is disqualified from being journaled, perhaps because
it is itself a journalized message and we wish to
avoid double journaling.
+L List-ID Mailing list identification, as per RFC 2919
M Message Text Normal ASCII, newlines seperated by CR's or LF's,
null terminated as always.
N Nodename Contains node name of system message originated on.
);
}
+ else if (!strcasecmp(hfield, "listid")) {
+ serv_printf("if%s header %s \"List-ID\" \"%s\"",
+ comp1, comp2,
+ htext
+ );
+ }
+
else if (!strcasecmp(hfield, "envfrom")) {
serv_printf("if%s envelope %s \"From\" \"%s\"",
comp1, comp2,
serv_printf("# WEBCIT_RULE|%d|%s|", i, encoded_rule);
output_sieve_rule(hfield, compare, htext, sizecomp, sizeval,
action, fileinto, redirect, automsg, final, my_addresses);
- serv_printf("");
+ serv_puts("");
}
wprintf("<td width=20%%>%s ", _("If") );
- char *hfield_values[14][2] = {
+ char *hfield_values[15][2] = {
{ "from", _("From") },
{ "tocc", _("To or Cc") },
{ "subject", _("Subject") },
{ "xmailer", _("X-Mailer") },
{ "xspamflag", _("X-Spam-Flag") },
{ "xspamstatus", _("X-Spam-Status") },
+ { "listid", _("List-ID") },
{ "size", _("Message size") },
{ "all", _("All") }
};
wprintf("<select id=\"hfield%d\" name=\"hfield%d\" size=1 onChange=\"UpdateRules();\">",
i, i);
- for (j=0; j<14; ++j) {
+ for (j=0; j<15; ++j) {
wprintf("<option %s value=\"%s\">%s</option>",
( (!strcasecmp(hfield, hfield_values[j][0])) ? "selected" : ""),
hfield_values[j][0],