Zbigniew Szalbot:
> Hello,
> 
> I am debugging a faulty operation of dkim-filter and have been asked 
> whether I can "capture/quarantine the message(s) which are in progress 
> at the time of the crash".
> 
> Is this possible with postifx? I looked at the main.cf parameters but 
> have not seen anything relating to capturing messages.

Like Sendmail, Postfix invokes the Milter application while receiving
mail. If an error happens, Postfix applies a default action (specified
with the milter_default_action parameter).

If the default action after failure is "accept", mail is delivered
immediately.  Otherwise, the mail transaction is aborted, and the
queue file is deleted. There is no point to keep rejected mail in
the queue.

Possible options to debug a Milter:

a) Specify a HOLD action (header_checks=static:hold) and do not
reject mail when the Milter fails (milter_default_action=accept).

b) Modify Postfix source code as shown below, and add a new default
action milter_default_action=quarantine.

        Wietse

*** ./milter8.c-        Fri Feb  8 18:58:42 2008
--- ./milter8.c Fri Aug 15 13:07:36 2008
***************
*** 537,542 ****
--- 537,544 ----
        reply = "550 5.5.0 Service unavailable";
      } else if (strcasecmp(milter->def_action, "tempfail") == 0) {
        reply = "451 4.7.1 Service unavailable - try again later";
+     } else if (strcasecmp(milter->def_action, "quarantine") == 0) {
+       reply = "H";
      } else {
        msg_warn("milter %s: unrecognized default action: %s",
                 milter->m.name, milter->def_action);


Reply via email to