Hi, Why does postfix (2.6.1, 2.7.0) force NOTIFY=NEVER when i change a RCPT TO: from a milter?
E.g. doing a delrcpt("old rcpt") and addrcpt("new rcpt"), forces NOTIFY=NEVER.
Log snippet:
Sep 23 22:02:26 seafox postfix/smtp[29516]: >
smtp.domain.cc[192.168.254.253]:25: RCPT TO:<[email protected]>
ORCPT=rfc822;[email protected] NOTIFY=NEVER
I've searched the source for 2.6, but fails to spot why the originator wouldn't
want to be notified on failures when
only the recipient have changed.
It seems like the following snippet from smtp_loop() (smtp/smtp_proto.c) adds
it, however i can't find where
rcpt->dsn_notify get's set to 1 when doing a smfi_delrcpt/smfi_addrcpt() combo.
if (rcpt->dsn_notify)
vstring_sprintf_append(next_command, " NOTIFY=%s",
dsn_notify_str(rcpt->dsn_notify));
Attached perl snippet will demonstrate my problem, tested on 2.6.1 and 2.7.0.
I would greatly appreciate any pointer in what i am doing wrong or missing.
/f
#!/usr/bin/perl
use Sendmail::Milter;
use strict;
sub eom_callback
{
my $ctx = shift;
$ctx->addrcpt("<[email protected]>") or print("failed to add
address.\n");
$ctx->chgheader("To", 1, "[email protected]") or print ("failed to
change header.\n");
$ctx->delrcpt("<[email protected]>") or print("failed to delete
address.\n");
return SMFIS_CONTINUE;
}
my %my_callbacks =
(
'eom' => \&eom_callback,
);
BEGIN:
{
if (not Sendmail::Milter::setconn("inet:123...@localhost")) {
print("Failed to detect connection information.\n");
}
if (not Sendmail::Milter::register($ARGV[0], \%my_callbacks,
SMFI_CURR_ACTS)) {
print("Failed to register callbacks for $ARGV[0].\n")
}
if (Sendmail::Milter::main()) {
print("Successful exit from the Sendmail::Milter engine.");
} else {
print("Unsuccessful exit from the Sendmail::Milter engine.");
}
}
PGP.sig
Description: This is a digitally signed message part
