-
-
-
-
-
-
-
-
-
-
-
-
/*
* Callback function to indicate that a vacation message should be generated
*/
// Perform the "reject" action (delete the message, and tell the sender we deleted it)
-// Returns: 1 or 0 to tell the caller to keep (1) or delete (0) the inbox copy of the message.
//
-int inbox_do_reject(struct irule *rule, struct CtdlMessage *msg) {
+void inbox_do_reject(struct irule *rule, struct CtdlMessage *msg) {
syslog(LOG_DEBUG, "inbox_do_reject: sender: <%s>, reject message: <%s>",
msg->cm_fields[erFc822Addr],
rule->autoreply_message
sender = msg->cm_fields[erFc822Addr];
}
else {
- return(0);
+ return;
}
// Assemble the reject message.
char *reject_text = malloc(strlen(rule->autoreply_message) + 1024);
if (reject_text == NULL) {
- return(0);
+ return;
}
sprintf(reject_text,
"Content-type: text/plain\n"
"Delivery status notification"
);
free(reject_text);
- return(0);
}
keep_message = 0;
break;
case action_reject:
- keep_message = inbox_do_reject(&ii->rules[i], msg);
+ inbox_do_reject(&ii->rules[i], msg);
+ keep_message = 0;
break;
case action_fileinto:
keep_message = inbox_do_fileinto(&ii->rules[i], msgnum);
keep_message = inbox_do_redirect(&ii->rules[i], msgnum);
break;
case action_vacation:
- // FIXME send the vacation message
+ // inbox_do_vacation(&ii->rules[i], msg);
keep_message = 1;
break;
}