> The posted message 690 originally had both the "then" and the
> "else" setting "$self->{_nullsender1rcpt_count}" to 1, but I think the
> "else" condition should set it to 0.
You're right. A patch is at the bottom of this message.
This patch also makes it work for either the current <> handling or with my
patch for use with debian. (That patch plus a lot of discussion posted at
about the same time as nullsender1rcpt.)
Brian
--- nullsender1rcpt.post0 Sun Nov 23 17:46:05 2003
+++ nullsender1rcpt Sun Dec 28 10:35:21 2003
@@ -20,11 +20,13 @@
sub mail_handler {
my ($self, $transaction, $address) = @_;
- if( $address->address eq '<>' ) {
+ # start _nullsender1rcpt_count at 1 to let _nullsender1rcpt_count==0
+ # be a flag for rcpt_handler
+ if( !defined($address->address) || $address->address eq '' ) {
$self->{_nullsender1rcpt_count} = 1;
}
else {
- $self->{_nullsender1rcpt_count} = 1;
+ $self->{_nullsender1rcpt_count} = 0;
}
return DECLINED;
}